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
PYTHON_PACKAGE_PREFIX=python27 | |
PYTHON_INSTALL_DIR=/opt/python2.7 | |
SETUPTOOLS_VER=2.2 | |
SETUPTOOLS_TARBALL=setuptools-$(SETUPTOOLS_VER).tar.gz | |
VIRTUALENV_VER=1.11.4 | |
VIRTUALENV_TARBALL=virtualenv-$(VIRTUALENV_VER).tar.gz | |
PYPI_SOURCE_MIRROR=http://pypi.douban.com/packages/source |
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 bash | |
# Change yum mirror | |
sed -i.backup 's/^enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf | |
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup | |
wget -O /etc/yum.repos.d/CentOS-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo | |
yum makecache | |
yum update | |
# Install ruby dependencies |
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
NAME=python27 | |
MAJOR_VERSION=2.7 | |
VERSION=2.7.6 | |
PYTHON_SOURCE=Python-$(VERSION) | |
INSTALL_DIR=/opt/python$(MAJOR_VERSION) | |
INTERMEDIATE_INSTALL_DIR=/tmp/installdir-$(NAME)-$(VERSION) | |
.PHONY: all clean package |
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
# -*- coding: utf-8 -*- | |
import os | |
import subprocess | |
import logging | |
import multiprocessing | |
import shutil | |
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) |
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
// g++ -std=c++11 | |
#include <cstdio> | |
#include <new> | |
#include <vector> | |
using std::size_t; | |
using std::vector; | |
using std::bad_alloc; | |
// 固定大小内存池, 非常基本的演示 |
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
diff -urN --strip-trailing-cr libao-1.1.0-orig/configure libao-1.1.0-gd/configure | |
--- libao-1.1.0-orig/configure 2011-02-23 00:30:22 +0800 | |
+++ libao-1.1.0-gd/configure 2013-05-12 08:53:47 +0800 | |
@@ -173,6 +173,14 @@ | |
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
+ | |
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( | |
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
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 | |
./configure \ | |
--prefix=$PREFIX \ | |
--build-suffix=-gd \ | |
--enable-memalign-hack \ | |
--enable-runtime-cpudetect \ | |
--enable-shared \ | |
--disable-static \ | |
--disable-debug \ |
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 -*- | |
""" | |
name.txt | |
O Efeito do Verão.mp3 | |
""" | |
name = open('name.txt').read().strip() |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Comments</string> | |
<key>scope</key> | |
<string>source.cs</string> | |
<key>settings</key> | |
<dict> |
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
// ==UserScript== | |
// @name v2ex novice killer | |
// @namespace http://shellex.info | |
// @author shellex(5h3ll3x@gmail.com) | |
// @description 干掉使用默认头像的人的发言 | |
// @include http://www.v2ex.com/go/* | |
// @include http://v2ex.com/go/* | |
// @include http://www.v2ex.com/?tab=* | |
// @include http://v2ex.com/?tab=* | |
// @include http://www.v2ex.com/ |