Skip to content

Instantly share code, notes, and snippets.

@oldsharp
oldsharp / git-send-email.sh
Last active September 7, 2015 08:03
git-send-email example script
git send-email --to="Ray Chen <oldsharp@163.com>" \
--cc="Ray Chen <oldsharp@gmail.com>" \
~/mail/drafts/ray/
@oldsharp
oldsharp / git-format-patch.sh
Last active September 7, 2015 08:02
git-format-patch example script
# This example will tell git-format-patch to prepare patches for Alpine
git format-patch -M \
--no-cover-letter \
--in-reply-to="<alpine.DEB.2.20.1509071424250.21394@jagger>" \
--thread=shallow \
--from="Ray Chen <oldsharp@gmail.com>" \
--to="Ray Chen <oldsharp@163.com>" \
--cc="Ray Chen <oldsharp@gmail.com>" \
--add-header="MIME-Version: 1.0" \
--add-header="Content-Type: text/plain; charset=UTF-8" \
# Options for GnuPG
# Copyright 1998, 1999, 2000, 2001, 2002, 2003,
# 2010 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
#
# Alpine configuration file
#
# vi: set filetype=pine :
#
# This file sets the configuration options used by Alpine and PC-Alpine. These
# options are usually set from within Alpine or PC-Alpine. There may be a
# system-wide configuration file which sets the defaults for some of the
# variables. On Unix, run alpine -conf to see how system defaults have been set.
# For variables that accept multiple values, list elements are separated by
@oldsharp
oldsharp / gitconfig
Last active December 26, 2016 07:27
gitconfig
# vi: set filetype=gitconfig :
[user]
name = Ray Chen
email = oldsharp@gmail.com
[core]
editor = vim
pager = less -+S
whitespace = trailing-space,space-before-tab,indent-with-non-tab,cr-at-eol
@oldsharp
oldsharp / yaswc.py
Created July 17, 2015 09:12
yet another stupid web crawler
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import re
import time
from bs4 import BeautifulSoup
from selenium import webdriver
@oldsharp
oldsharp / build-git-src.sh
Last active January 13, 2016 05:34
Build git from source
# Example procedures to build git from source.
# See https://github.com/git/git/blob/master/INSTALL for more info and
# detailed instructions.
#
# Author: Ray Chen <oldsharp@gmail.com>
# License: Public Domain
# Resolve dependency (administrative privileges may required):
# Red Hat Enterprise Linux 7 ("RHEL7") | CentOS 7:
yum install curl-devel expat-devel gettext-devel openssl-devel \
@oldsharp
oldsharp / shadowsocks.pac
Last active August 29, 2015 14:21
customized proxy auto-config file, see https://github.com/clowwindy/gfwlist2pac
// Generated by gfwlist2pac
// https://github.com/clowwindy/gfwlist2pac
var domains = {
"gimpshop.com": 1,
"directcreative.com": 1,
"speedpluss.org": 1,
"mingpaovan.com": 1,
"wikinews.org": 1,
"joachims.org": 1,
@oldsharp
oldsharp / screenrc
Last active August 25, 2016 15:36
screenrc
# Configure File for GNU Screen
# This is how one can set a reattach password:
#password ODSJQf.4IJN7E # "1234"
# The following lines give a two-line status, with the current window
# highlighted
hardstatus off
hardstatus alwayslastline
@oldsharp
oldsharp / osx.profile
Last active March 31, 2017 01:04
profile for logging shells
# User-specified .profile file for Apple Terminal.
# Set architecture flags:
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence:
#export PATH="/usr/local/bin:${PATH}"
# Enable terminal color when ls
export CLICOLOR=1