Skip to content

Instantly share code, notes, and snippets.

View yaotian's full-sized avatar

yaotian

View GitHub Profile
Team behind Go:
- Ken Thompson
- Co-Creator of Unix
- Co-Creator of UTF-8
- Creator of 'B', the direct predecessor to the 'C' programming language
- Rob Pike
- Member of Unix Team at Bell Labs
- Creator of Plan 9
- Co-Creator of UTF-8
@yaotian
yaotian / gist:6304829
Created August 22, 2013 09:05
hadoop alias
export MY_HADOOP_HOME=/data/current_hadoop
alias hkill="${MY_HADOOP_HOME}/bin/hadoop --config ${MY_HADOOP_HOME}/conf job -Dmapred.job.tracker=master:9001 -kill "
alias hcat="${MY_HADOOP_HOME}/bin/hadoop fs -cat "
alias hget="${MY_HADOOP_HOME}/bin/hadoop fs -get "
alias hls="${MY_HADOOP_HOME}/bin/hadoop fs -ls "
alias hmkdir="${MY_HADOOP_HOME}/bin/hadoop fs -mkdir "
alias hchmod="${MY_HADOOP_HOME}/bin/hadoop fs -chmod "
alias hput="${MY_HADOOP_HOME}/bin/hadoop fs -put "
alias hrm="${MY_HADOOP_HOME}/bin/hadoop fs -rmr "
alias hstart="${MY_HADOOP_HOME}/bin/start-all.sh"
package main
import (
"crypto/tls"
"net"
"net/http"
"time"
"fmt"
"errors"
)
@yaotian
yaotian / gist:4214543
Created December 5, 2012 10:24 — forked from fxsjy/gist:3550053
Bakup Weibo to Disk
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"
打开/前往
⌘T 前往文件
⌘⌃P 前往项目
⌘R 前往 method
⌘⇧P 命令提示
⌃G 前往行
⌘KB 开关侧栏
⌃ ` python 控制台
⌘⇧N 新建窗口
@yaotian
yaotian / __init__.py
Created September 3, 2012 23:15 — forked from ipconfiger/__init__.py
OAuth包,实现了sina,QQ,网易,搜狐的OAuth认证
# -*- Encoding: utf-8 -*-
import base64
import binascii
import cgi
import hashlib
import hmac
import logging
import time
import urllib
import urlparse
@yaotian
yaotian / markdown.css
Created August 28, 2012 16:05 — forked from zhimiaoli/markdown.css
github的markdown的样式
.markdown-body {
font-size: 14px;
line-height: 1.6;
}
.markdown-body > *:first-child {
margin-top: 0 !important;
}
.markdown-body > *:last-child {
margin-bottom: 0 !important;
}
@yaotian
yaotian / Server.cs
Created April 14, 2012 02:02 — forked from bschwind/Server.cs
Implements a simple TCP server with one thread per client
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Collections.Concurrent;
namespace GraphicsToolkit.Networking