This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import struct | |
from mutagen.easyid3 import EasyID3 | |
def decode_gbk_from_unicode(s): | |
l, f = [], [] |
###### | |
# 本归档每周末收录当周的Tips | |
###### | |
# 以root身份执行上一条命令 | |
$ sudo!! | |
# 返回用户主目录 | |
$ cd |
265.com,2mdn.net,adnxs.com,adroll.com,adsonar.com,adtechus.com,aipai.com,atdmt.com,betrad.com,bluekai.com,cctv*.com,china.com,compete.com,douban.fm,etao.com,fantong.com,fastcdn.com,gamesville.com,google-analytics.com,harrenmedianetwork.com,homeinns.com,img.cctvpic.com,invitemedia.com,ipinyou.com,irs01.com,irs01.net,jing.fm,jysq.net,ku6cdn.com,kuaidi100.com ,legolas-media.com,live.com,lxdns.com,lycos.com ,lygo.com ,mangocity.com,mathtag.com,mediaplex.com,mediav.com,mlt01.com,mookie1.com,mosso.com,pixlr.com ,ptlogin2.qq.com,pubmatic.com,qstatic.com,quantserve.com,scanscout.com,scorecardresearch.com ,serving-sys.com ,sina.com,sinahk.net,sinajs.com ,snyu.com,staticsdo.com,sttlbb.com,tremormedia.com,tudouui.com,vizu.com,wrating.com ,xiu.com,yieldmanager.com,youshang.com, |
#!/usr/bin/tclsh8.5 | |
# | |
# Usage: git-unmerged branch1 branch2 | |
# | |
# Shows all the non-common commits in the two branches, where non-common | |
# commits means simply commits with a unique commit *message*. | |
proc getlog branch { | |
lrange [split [exec git log $branch --oneline] "\n"] 0 400 | |
} |
Tencent (腾讯):
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
module Todo | |
class API < Grape::API | |
use Rack::Session::Cookie | |
version 'v1', :format => :json | |
helpers do | |
def current_user | |
return nil if env['rack.session'][:user_id].nil? | |
@current_user ||= User.get(env['rack.session'][:user_id]) | |
end |
#!/usr/bin/ruby | |
require 'rss' | |
# Usage | |
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/ | |
# episodes.rss | |
# OR | |
# $ ./railscasts.rb | |
p 'Downloading rss index' |
#如何将 Rails 应用程序部署到 VPS 上
如果已经在 VPS 上假设好了 Rails 生产环境,接下来就可以将部署应用程序了。
###需要用到的工具