Skip to content

Instantly share code, notes, and snippets.

#################################
#
# 本清单基于 ubuntu 12.04,
# 下个 ubuntu 的 LTS
# 发出来后,会相应更新这里的内容。我的目标是按步执行可以零错误完成安装。
# 注意,本文件只是一个清单,不是一个可以安全执行的脚本
#
#################################
# create a linode,login as root, and create a common user for all the tasks
@hardywu
hardywu / pngout.rb
Created July 14, 2013 00:15
homebrew formula for the pngout of 20130221. Fork from https://bitbucket.org/socradev/homebrew-alt
require 'formula'
class Pngout < Formula
url 'http://static.jonof.id.au/dl/kenutils/pngout-20130221-darwin.tar.gz'
homepage 'http://www.jonof.id.au/kenutils'
md5 '2f35b7369d5ab668cea414772de6fba9'
version '20130221'
def install
bin.install 'pngout'
@hardywu
hardywu / config.ru
Created July 5, 2013 10:58
config.ru script to set up a personal wiki on './public'
#!/usr/bin/env ruby
require 'rubygems'
require 'gollum/app'
# disable :run
# configure :development, :staging, :production do
# set :raise_errors, true
@hardywu
hardywu / post.rb
Last active December 19, 2015 05:58
A rails model for gollum-lib, which is used to embed `gollum` into existing rails project. The `unindexable` and `unreadable` statuses are introduced. The `pull` and `push` method is added to have the git repository sync with its **remote origin**.
class Post
@data = Gollum::Wiki.new('doc/blog.git', :mathjax => true)
@@unindexable = 'page'
@@unreadable = 'pending'
def self.data
@data
end
def self.reload