View Preferences.sublime-settings
//
// Sublime Text 3 设置翻译 by LokiSharp
//
{
// 主题文件的路径
"color_scheme": "Packages/User/SublimeLinter/Solarized (Dark) (SL).tmTheme",
// 设置字体和大小
"font_face": "inziu iosevka SC",
"font_size": 12,
View 20111011_SteveYeggeGooglePlatformRant.md

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

View pagination.md

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

View concurrency-in-go.md
View remove-docker-containers.md
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
View idle.sh
#!/bin/bash
echo "This is a idle script (infinite loop) to keep container running."
echo "Please replace this script."
cleanup ()
{
kill -s SIGTERM $!
exit 0
}
View docker-clean-image.sh
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
View gist:bcfc3b814f0e70bcc436

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
View loop.sh
-------- start loop --------
2015/09/30 15:27:36.745404 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/sched.go:303"] active!
2015/09/30 15:27:36.746252 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:55"] loadNodesMeta Normal 1 | ReservedNormal 0
2015/09/30 15:27:36.746267 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:56"] loadNodesMeta Offline 0 | ForcedOffline 0
2015/09/30 15:27:36.746274 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:57"] loadNodesMeta Clear 0
2015/09/30 15:27:36.746797 [D][SCD][#1443598056][172.17.0.4]["qiniu.com/qcos/kernel.v3/sched/pick.go:144"] Real <cpu> 0.091 core / 1.000 core = 0.09 <mem> 466.8 MB / 1.956 GB = 0.23 <ls> 16 <bs> 14
2015/09/30 15:27:36.751137 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:380"] check the 0 of 1 pod(s) from app 10000
2015/09/30 15:27:36.751338 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:328"] loadDirtyPods dirty pods(all): 1
2015/09/30 15