Skip to content

Instantly share code, notes, and snippets.

View brain-zhang's full-sized avatar

brainzhang brain-zhang

View GitHub Profile

svn-rev-diff-export

svn-rev-diff-export is a handy bash snippet that allows you to export files changed between two revisions.

Usage

svn-rev-diff-export.sh -u <path> -f revFROM -t revTO -o <path>

Options

-f, --rev-from revFROM

#! /usr/bin/env python2.7
#encoding:utf-8
#@description:一个python守护进程的例子
#@tags:python,daemon
import sys
import os
import time
import atexit
from signal import SIGTERM
#!/bin/sh
yum -y groupinstall "Development Tools"
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh epel-release-5*.rpm
rpm -Uvh remi-release-5*.rpm
yum -y install python-devel screen
yum --enablerepo=remi install libcurl-devel -y
mkdir /opt/miner
cd /opt/miner
@echo off
color 0a
title 清理win7系统垃圾---
echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo.★☆ ☆★
echo.★☆ ☆★
echo.★☆ ☆★
echo ★☆ 正在清除系统垃圾文件,请稍等..... ☆★
echo.★☆ ☆★
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
#!/bin/sh
# Warning!
# if you DIY a stage package like this,
# you must use the Stage3`s /etc/udev/*
# or rm /etc/udev/rules.d/70*
# Warning!
# last edited by likuku on 2012.03.29
DATE=`date +%Y_%m_%d_%H_%M_%S`
ARCH=`uname -m`
# Index
---------------------------------------------------------------------
curl -XPUT http://localhost:9200/pictures/ -d '
{
"settings": {
"analysis": {
"analyzer": {
"index_analyzer": {
"tokenizer": "standard",
#!/usr/bin/env python
#
# Corey Goldberg, Dec 2012
#
import os
import sys
import xml.etree.ElementTree as ET
RESET_COLOR = "\033[0m"
COLOR_CODES = {
"debug" : "\033[1;34m", # blue
"info" : "\033[1;32m", # green
"warning" : "\033[1;33m", # yellow
"error" : "\033[1;31m", # red
"critical" : "\033[1;41m", # background red
}

Simple Starting Point

创建 Model

var Person = Backbone.Model.extend();