Skip to content

Instantly share code, notes, and snippets.

Avatar
🍃
Waiting for autumn

Wang Dàpéng wong2

🍃
Waiting for autumn
View GitHub Profile
@mynameisfiber
mynameisfiber / gist:2853066
Created Jun 1, 2012
Golang http close body blocking problem
View gist:2853066
package main
import (
"crypto/tls"
"net"
"net/http"
"time"
"fmt"
"errors"
)
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@lepture
lepture / china-dream.md
Last active Oct 8, 2015
龍應台:我們的「中國夢」(8月1日北京大學演講講辭)
View china-dream.md

龍應台:我們的「中國夢」(8月1日北京大學演講講辭)

【明報專訊】第一次接到電話,希望我談談「中國夢」的時候,我的第一個反應是:「一千枚飛彈對準我家,我哪裏還有中國夢啊?」

可是沉靜下來思索,1952年生在台灣的我,還有我前後幾代人,還真的是在「中國夢」裏長大的,我的第一個中國夢是什麼呢?

我們上幼稚園時,就已經穿著軍人的制服、帶著木製的步槍去殺「共匪」了,口裏唱著歌。當年所有的孩子都會唱的那首歌,叫做《反攻大陸去》:

反攻 反攻 反攻大陸去

@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@ravageralpha
ravageralpha / fetchsub.sh
Created Oct 27, 2012
shell script get subtitle from shooter.cn
View fetchsub.sh
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:$(basename $0) [eng] files..."
}
[ $# -eq 0 ] && USAGE && exit 0
ERROR(){
@olasitarska
olasitarska / pgessays.py
Created Nov 18, 2012
Builds epub book out of Paul Graham's essays.
View pgessays.py
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Sep 3, 2021
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@JoelBesada
JoelBesada / README.md
Last active Nov 22, 2020
Backtick Example Command
View README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@bomberstudios
bomberstudios / sketch-plugins.md
Last active Sep 4, 2021
A list of Sketch plugins hosted at GitHub, in no particular order.
View sketch-plugins.md