号称可能改变世界的人越来越多,科技新闻几乎等同于IT/创业新闻,说的都是普罗大众一眼看得懂的事情。
Author: Haahey
[转载]我的心悲伤过七次
Seven times have I despised my soul:
我的心悲伤过七次
Kahlil Gibran,1883—1931 纪伯伦
The first time when I saw her being meek that she might attain height.
第一次,是当我看到她本可进取,却故作谦卑时。
The second time when I saw her limping before the crippled.
第二次,是当我看到她在瘸子面前跛行而过时。
The third time when she was given to choose between the hard and the easy,
and she chose the easy.
第三次,是当她在难易之间,却选择了容易时。
The fourth time when she committed a wrong, and comforted herself that others
also commit wrong.
第四次,是当她犯了错,却借由别人也会犯错来宽慰自己时。
The fifth time when she forbore for weakness, and attributed her patience to
strength.
第五次,是当她因为软弱而忍让,却声称为自己的坚韧时。
The sixth time when she despised the ugliness of a face, and knew not that it
was one of her own masks.
第六次,是当她鄙夷一张丑恶的嘴脸,却不知那正是自己面具中的一副时。
And the seventh time when she sang a song of praise, and deemed it a virtue.
第七次,是当她吟唱赞歌,却自诩为一种美德时。
初学GitHub
(背景:之前有限度接触过svn和cvs,曾经架设过一个svn服务器但从未投入实际使用。)
首先阅读了GitHub的4篇教程,分别是Set Up Git、Create a Repository、Fork a Repository、Be Social。实践了前两篇。
教程中关键的命令如下:
git remote add origin https://github.com/username/Hello-World.git
# Creates a remote named “origin” pointing at your GitHub repository
git push origin master
# Sends your commits in the “master” branch to GitHub
练习时首先在办公室将一个python文件add/commit/push到GitHub上,回到家里后在家里的计算机上做了些更改再commit/push到GitHub。第二天回到办公室修改代码,试图push时提示:
$ git push origin master
To https://github.com/****/Hello-World.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/****/Hello-World.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: ‘git pull’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.
于是按照提示运行
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/****/Hello-World
8e27c93..9d246e3 master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull
If you wish to set tracking information for this branch you can do so with:
git branch –set-upstream-to=origin/ master
由此可知不管push还是pull,都要指定remote和branch。这里remote是origin, branch是master。
再运行
$ git pull origin master
$ git push origin master
本地代码和GitHub就同步了。
PS:发现了一个有用的工具cheat。可以通过gem install cheat来安装,然后运行cheat git快速参考git的用法。另外尝试了cheat cheat 和cheat vim。初次使用时下载cheatsheet有点慢。
去除Duckduckgo.com搜索结果链接中的HTTPS
duckduckgo.com默认搜索结果的链接是HTTPS而非HTTP。但是Wikipedia的HTTPS链接在中国大陆被封禁了,另外Firefox打开https://ieeexplore.ieee.org时页面显示不完整。
解决办法:1. 安装Firefox插件HTTPS Everywhere
2. 进入Firefox profile目录(OS X下是~/Library/Application Support/Firefox/Profiles/**/),在这下面的HTTPSEverywhereUserRules文件夹添加ieeexplore.xml和wikipedia.xml
ieeexplore.xml
<ruleset name=”ieeexplore”>
<target host=”ieeexplore.ieee.org” />
<rule from=”^https://(ieeexplore\.)?ieee\.org/” to=”http://ieeexplore.ieee.org/”/>
</ruleset>
wikipedia.xml
<ruleset name=”Wikipedia”>
<target host=”en.wikipedia.org” />
<rule from=”^https://(en\.)?wikipedia\.org/” to=”http://en.wikipedia.org/”/>
</ruleset>
参考: https://duck.co/topic/how-to-force-wikipedia-bang-or-search-to-use-http
易忘的中秋
回家了。处理了一些家事。十五这天,妈妈擀面,拌芝麻,耐心地做了一个又一个芝麻饼。她让我带几个饼给荣洪。她说他没有娘了,带些饼给他吃。
十六这天是金时超结婚。中午去吃面,遇到了很多多年不见的本家亲戚。大部分人即使见过一面,也记不住了。
和大伯伯家修复关系了。中午爸妈和我们一起去看了婷婷的未来老公,还去金光哥哥家里喝了茶。
人生无处不是坑
爱过知情重
醉过知酒浓
踩到了,才知道处处是地雷。
弃用Google Chrome
改用Firefox已经有一段时间了,但Chrome仍然留着。昨天打开过一次后发现它又偷偷地设置成开机自动启动了。
发现这是一个长期存在的问题
http://productforums.google.com/forum/#!topic/chrome/e4meegMLmaY
白白胖胖
密码保护:密码测试
[fake]Jonathan Ive praises Windows Phone
Jonathan Ive, who is now Senior Vice President of Industrial Design at Apple Inc., praises Windows Phone fondly on WWDC 2013. Read quoted text below:
“…I think there is a profound and enduring beauty in simplicity, in clarity, in efficiency. True simplicity is derived from so much more than just the absence of clutter and ornamentation. It’s about bringing order to complexity. Windows Phone 7 is a clear representation of these goals. It has a whole new structure that it is coherent. and it is applied across the entire system…”
Watch the full video here.


