parents()方法很好用,配合first()可以省掉一大串难于维护的.parent()
$('.some_class').parents('form').first()
clear the ignored files which has already been tracked:
| # author: arcturo | |
| # from https://github.com/arcturo/library/blob/master/coffeescript/Rakefile | |
| require "rdiscount" | |
| require "mustache" | |
| require "active_support/core_ext/string" | |
| require "fileutils" | |
| def generate(page, template = "site/page.ms") | |
| Mustache.render( |
| source 'http://ruby.taobao.org' | |
| gem 'sinatra' | |
| gem 'sinatra-reloader' | |
| gem 'slim' | |
| gem 'sass' | |
| gem 'coffee-script' | |
| gem 'compass' | |
| gem 'pry' |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| @import url(css/reset.css); | |
| @import url(css/style.css); | |
| </style> | |
| <script src="js/script.js"></script> | |
| </head> | |
| <body> |
gcc -M hello.c 可以得到某文件依赖的头文件。
grep processor /proc/cpu_info 显示当前的CPU数目
sudo shutdown -r now 重启机器
sshfs yourname@host:/path/to/your/dir ~/local sshfs挂载到本地
sudo -u fleuria bash: 切换用户
before rvm install 1.9.2, make sure
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion nodejs
rvm requirements可以列出依赖的软件。
| #include <assert.h> | |
| #include "inc/vector.h" | |
| struct ir_vector* iv_new(size_t entry_size, size_t default_max_count) { | |
| struct ir_vector *iv; | |
| assert(entry_size > 0); | |
| iv = (struct ir_vector*)malloc(sizeof(struct ir_vector)); | |
| iv->count = 0; | |
| iv->entry_size = entry_size; |
| zh-CN: | |
| authlogic: | |
| error_messages: | |
| login_blank: '不能为空' | |
| login_not_found: '未找到用户' | |
| login_invalid: '用户不正确' | |
| consecutive_failed_logins_limit_exceeded: Consecutive failed logins limit exceeded, account is disabled. | |
| email_invalid: "格式不正确" | |
| password_blank: can not be blank | |
| password_invalid: is not valid |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| RED="\[\033[0;31m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| GREEN="\[\033[0;32m\]" | |
| NO_COLOUR="\[\033[0m\]" | |
| PS1="$GREEN\u@machine$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ " |
| module BTree where | |
| data BTree a b = Empty | |
| | BNode { | |
| kv :: (a, b), | |
| left :: BTree a b, | |
| right :: BTree a b | |
| } | |
| deriving(Show, Eq) | |