Skip to content

Instantly share code, notes, and snippets.

View mccxj's full-sized avatar

xiaojian cai mccxj

View GitHub Profile
@mccxj
mccxj / alias_generator.rb
Created January 27, 2013 02:53
Alias Generator for Posts
# Alias Generator for Posts.
#
# Example:
# alias /20121010_hello.html to /blog/20121010_hello.html
# alias /hello.html to /pages/20121010_hello.html
#
# Place the full path of the alias (place to redirect from) inside the
# destination post's YAML Front Matter. One or more aliases may be given.
#
# Forked from Thomas Mango 's jekyll_alias_generator
@mccxj
mccxj / gist:4337107
Created December 19, 2012 14:39
经验
不要表现得像个傻瓜;
不要把别人的工作当成理所当然;
享受当下;
无论何时都要诚实;
谦虚;
友善;
尊重别人的意愿;
该放手就放手;
勇于接纳失败;
剪一个酷发型。
@mccxj
mccxj / gist:4336852
Created December 19, 2012 14:00
timeout.js
requestAnimFrame = (function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback, element) {
return setTimeout(callback, fps);
}
})(),
@mccxj
mccxj / openerp-server.conf
Created November 10, 2012 13:30
openerp-server.conf
#/etc/openerp-server.conf(5) - configuration file for openerp-server(1)
[options]
# Enable the debugging mode (default False).
verbose = False
debug_mode = False
# The file where the server pid will be stored (default False).
#pidfile = /var/run/openerp.pid
@mccxj
mccxj / sources.list.sh
Created November 10, 2012 13:28
更换ubuntu源为163的
cd /etc/apt/
sudo wget http://mirrors.163.com/.help/sources.list.precise
sudo mv sources.list.precise sources.list
sudo apt-get update
@mccxj
mccxj / get-fonts.sh
Created November 10, 2012 13:27
自动安装微软雅黑
wget -O get-fonts.sh.zip http://files.cnblogs.com/DengYangjun/get-fonts.sh.zip
unzip -o get-fonts.sh.zip 1>/dev/null
chmod a+x get-fonts.sh
./get-fonts.sh
@mccxj
mccxj / openerp
Created November 10, 2012 13:26
Open ERP web 启动脚本
#!/bin/sh
#
# Open ERP web 启动脚本
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/opt/openerp/openerp-server
CONFIGFILE=/opt/openerp/openerp-server.conf
NAME=openerp
DESC=openerp
@mccxj
mccxj / google-reader-subscriptions.xml
Created December 5, 2009 03:31
Google 阅读器中 Bonyfish 的订阅
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Google 阅读器中 Bonyfish 的订阅</title>
</head>
<body>
<outline text="94smart's Blog" title="94smart's Blog" type="rss"
xmlUrl="http://blog.94smart.com/feed" htmlUrl="http://blog.94smart.com"/>
<outline text="Amoeba 开发者博客" title="Amoeba 开发者博客" type="rss"
xmlUrl="http://amoeba.meidusa.com/wordpress/?feed=rss2" htmlUrl="http://amoeba.meidusa.com/wordpress"/>
require 'set'
require File.dirname(__FILE__) + '/core_ext/module/attribute_accessors'
require File.dirname(__FILE__) + '/core_ext/load_error'
require File.dirname(__FILE__) + '/core_ext/kernel'
module Dependencies #:nodoc:
extend self
# Should we turn on Ruby warnings on the first load of dependent files?
mattr_accessor :warnings_on_first_load
define _editor=vi
set serveroutput on size 1000000
set trimspool on
set long 5000
set linesize 100
set pagesize 9999
column plan_plus_exp format a80
column global_name new_value gname
set termout off
define gname=idle