-
只管去做。
Just do it
-
1%的决策,都可以更改。
1% of decisions aren't permanent
-
招人要慎重,解雇要快速。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# ./git-file-branch.sh fn.cpp | |
prev=$(git rev-parse $(git rev-list -n1 --all -- $1)^) | |
for br in $(git branch -a | cut -c 3-); do | |
[ "x$(git rev-list -n1 --no-merges --first-parent $prev..$br -- $1)" != "x" ] && echo $br | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
/* gcc -lpthread q.c && ./a.out */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# * 358aee4 (HEAD) fix css | |
# | css/site.css | 13 ++--- | |
# | | |
# * f869f40 init site | |
# | html/index.html | 12 ++-- | |
# | html/header.html | 34 +----- | |
# | css/site.css | 61 +++++++------ | |
# | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
import hashlib | |
import math | |
def count_collision(nbucket, nkey): | |
buckets = [0] * nbucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage() | |
{ | |
local name=${0##*/} | |
cat >&2 <<-END | |
Rewrite history to squash all commits wiht message starts with 'fixup!' to | |
its first parent. By [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.6 | |
# coding: utf-8 | |
import types | |
# DOUBLE_LINE_MAP = [ u'\u2800\u2880\u28a0\u28b0\u28b8', | |
# u'\u2840\u28C0\u28E0\u28F0\u28F8', | |
# u'\u2844\u28C4\u28E4\u28F4\u28FC', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# 1. create config file ~/.gitbox.conf | |
# | |
# cat ~/.gitbox.conf | |
# ~/xpkit fetch,push | |
# ~/wiki | |
# | |
# # format: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage() | |
{ | |
cat >&2 <<-END | |
usage: git gotofix <fn> | |
Fix <fn> at the commit where <fn> is lastly modified. | |
And get HEAD back to where before using git-gotofix. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |
OlderNewer