Skip to content

Instantly share code, notes, and snippets.

View biti's full-sized avatar

liuzihua biti

View GitHub Profile
@mimosz
mimosz / smser.rb
Created August 23, 2012 16:00
短信宝
# -*- encoding: utf-8 -*-
require 'digest/md5'
require 'nestful'
class Smsbao
def initialize(login, passwd)
@login = login
@passwd = Digest::MD5.hexdigest(passwd.to_s)
end
@samqiu
samqiu / railscasts.rb
Last active December 9, 2022 03:49
Download free Railscast video
#!/usr/bin/ruby
require 'rss'
# Usage
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/
# episodes.rss
# OR
# $ ./railscasts.rb
p 'Downloading rss index'
@liwh
liwh / gist:1022751
Created June 13, 2011 13:20
install coreseek on mac os
  1. 按照coreseek网站上的安装步骤没装上,所以采用了下面的安装方式,安装成功!

sudo port install autoconf263 libtool-devel m4 autoconf automake libtool

cd mmseg-3.2.14
aclocal && glibtoolize —copy —force —ltdl && autoreconf -i -f && automake —a && ./configure —prefix=/usr/local/mmseg3 && make && sudo make install

cd ../csft-3.2.14
./configure —prefix=/usr/local/coreseek —without-unixodbc —with-mmseg —with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ —with-mmseg-libs=/usr/local/mmseg3/lib/ —with-pgsql

@vvalgis
vvalgis / Capistrano tasks for starting unicorn.rb
Created May 7, 2010 08:13
Capistrano tasks for starting unicorn
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
end
task :stop, :roles => :app, :except => { :no_release => true } do