Skip to content

Instantly share code, notes, and snippets.

@samqiu
samqiu / _service.md
Created January 7, 2017 11:15 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

电视里看到一个专题片,因为最后事发时只有熟女在场,片子里大部分是这个熟女在讲述。

说是一对中年夫妻,有一对十几岁的女儿,家庭幸福。可后来有一天老公忽然向熟女坦白他有外遇,熟女的回答是:你赶快改正错误!

老公对这个反应很惊讶,因为一般女人听到这种事都会跳起来,但他仍然不愿意改。熟女在一家律师事务所做办公助理,忽然被解雇,雪上加霜。熟女人生陷入低谷。

正好此时有个年轻小伙法学院毕业,刚开了个自己的事务所,熟女去申请工作,立刻就被录用,然后俩人就搞在了一起。熟女说:老公有了外遇后,我只是想被人爱,被人捧,其他什么都没想。

他们的关系后来被她老公察觉,老公很愤怒,但熟女想办法骗了过去。

@samqiu
samqiu / RubyConfChina.geojson
Last active December 21, 2015 22:38
RubyConfChina 2013 开始接受报名和售票!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samqiu
samqiu / .zshrc
Created April 28, 2013 02:27 — forked from SlexAxton/.zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@samqiu
samqiu / railscast
Created February 27, 2013 09:12
Railscast
http://media.railscasts.com/assets/episodes/videos/001-caching-with-instance-variables.mp4
http://media.railscasts.com/assets/episodes/videos/002-dynamic-find-by-methods.mp4
http://media.railscasts.com/assets/episodes/videos/003-find-through-association.mp4
http://media.railscasts.com/assets/episodes/videos/004-move-find-into-model.mp4
http://media.railscasts.com/assets/episodes/videos/005-using-with-scope.mp4
http://media.railscasts.com/assets/episodes/videos/006-shortcut-blocks-with-symbol-to-proc.mp4
http://media.railscasts.com/assets/episodes/videos/007-all-about-layouts.mp4
http://media.railscasts.com/assets/episodes/videos/008-layouts-and-content-for.mp4
http://media.railscasts.com/assets/episodes/videos/009-filtering-sensitive-logs.mp4
http://media.railscasts.com/assets/episodes/videos/010-refactoring-user-name-part-1.mp4
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
@samqiu
samqiu / gist:1504240
Created December 21, 2011 02:11
哪个更快
SELECT * FROM `post` WHERE `status` != 'inherit' AND `status` != 'auto-draft';
SELECT * FROM `post` WHERE `status` NOT IN ('inherit', 'auto-draft');
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set expandtab " convert tabs to spaces
@samqiu
samqiu / VladGh.com-LEMP-install-log
Created May 14, 2011 10:17
VladGh.com-LEMP-install-log
Ign http://cn.archive.ubuntu.com natty InRelease
Ign http://cn.archive.ubuntu.com natty-updates InRelease
Hit http://cn.archive.ubuntu.com natty Release.gpg
Hit http://cn.archive.ubuntu.com natty-updates Release.gpg
Hit http://cn.archive.ubuntu.com natty Release
Hit http://cn.archive.ubuntu.com natty-updates Release
Ign http://archive.canonical.com natty InRelease
Ign http://extras.ubuntu.com natty InRelease
Hit http://cn.archive.ubuntu.com natty/main Sources
Hit http://cn.archive.ubuntu.com natty/restricted Sources