This file contains hidden or 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
# 在本地服务器建立 rubygems.org 的镜像缓存,以提高 gem 的安装速度 | |
# 此配置设置缓存过期为1天,也就是说,新上的 gem 无法马上安装 | |
# 做这个起什么作用? | |
# rubygems 的很多资源文件是存放到 Amazon S3 上面的,由于 GFW 对某些 S3 服务器又连接重置或丢包,导致 gem 安装异常缓慢或有时候根本无法连接安装。 | |
# 而通过这种跳板的方式可以很好的解决这个问题,当然前提是 Nginx反向代理 服务器需要在国外 | |
proxy_cache_path /var/cache/rubygems levels=1:2 keys_zone=RUBYGEMS:10m | |
inactive=24h max_size=1g; | |
server { | |
listen 80; |
This file contains hidden or 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
<?php | |
if(!file_exists($changeset_config_file = 'changeset.conf.json')) | |
{ | |
$prefix = '/path/to/workcopy/of/svn/'; | |
$stop_keywords = array('.gitignore', '.bak', '.swp'); | |
$authors = array(); | |
$base_path = dirname(__file__); | |
$repo_username = 'svn_username'; | |
$repo_password = 'svn_pass'; | |
$repo_url = 'http://domain/path/svn/root/'; |
This file contains hidden or 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/php | |
<?php | |
$options = getopt(implode("", array_keys($options_config = array( | |
"u::"=>"commit for username", | |
"h"=>"print help message and die", | |
"d"=>"just debug, do not write", | |
)))); | |
$options['d'] = isset($options['d']); | |
$options['h'] = isset($options['h']); | |
if($options['h']) |
This file contains hidden or 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 | |
#### | |
# NAME: convert-mysql-to-sqlite3.sh | |
# AUTHOR: Matt Reid | |
# DATE: 2011-03-22 | |
# LICENSE: BSD | |
#### | |
if [ "x$1" == "x" ]; then | |
echo "Usage: $0 " | |
exit |
This file contains hidden or 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
<job id="TheShawshankHammer"> | |
<script language="JScript" id="env"> | |
var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var WshShell = WScript.CreateObject("WScript.Shell"); | |
var deskPath = WshShell.SpecialFolders("Desktop"); | |
var arg = WScript.Arguments; | |
var scriptPath = WScript.ScriptFullName.split('\\').slice(0, -1).join('\\') + '\\'; | |
</script> | |
<script language="JScript" id="scan"> |
This file contains hidden or 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/python | |
#coding=utf-8 | |
''' | |
用于使用地下铁路ssh代理的python脚本 | |
1. 把你的邮箱地址发给我(etng2004#gmail.com),标题为:dixiatielu,内容是你的邮箱地址, 我会把邀请码和使用方法回给你 | |
2. 个人目录下创建 .gfw.ini,如运行(vim ~/.gfw.ini)写入以下内容: | |
[account] | |
host=地下铁路主机地址 | |
port=地下铁路端口 |
This file contains hidden or 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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
This file contains hidden or 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 | |
# auto start ssh proxy under mac osx, need to sshpass support | |
# goto http://sourceforge.net/projects/sshpass/ download http://nchc.dl.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz | |
# cd ~/Downloads | |
# tar -zxvf sshpass-1.05.tar.gz | |
# cd sshpass-1.05 | |
# ./configure | |
# make | |
# sudo make install | |
# done |
This file contains hidden or 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
# Numerous always-ignore extensions | |
*.diff | |
*.err | |
*.orig | |
*.log | |
*.rej | |
*.swo | |
*.swp | |
*.zip | |
*.vi |
This file contains hidden or 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/php | |
<?php | |
/** | |
* svn version difference package tool | |
* | |
* copy this script to /usr/local/bin/ and change work directory to your svn project root | |
* then you can use the following command to produce a release package for your project: | |
* ` svnpackdiff -b2013-02-03 -e2013-02-28 -apaul -atom -alily ` | |
* | |
* @author etng<[email protected]> |
OlderNewer