type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
/* | |
KISSY CSS Reset | |
理念:清除和重置是紧密不可分的 | |
特色:1.适应中文 2.基于最新主流浏览器 | |
维护:玉伯(lifesinger@gmail.com), 正淳(ragecarrier@gmail.com) | |
*/ | |
/* 清除内外边距 */ | |
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ | |
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ |
# Aliases | |
alias g='git' | |
compdef g=git | |
alias gst='git status' | |
compdef _git gst=git-status | |
alias gl='git pull' | |
compdef _git gl=git-pull | |
alias gup='git fetch && git rebase' | |
compdef _git gup=git-fetch | |
alias gp='git push' |
/** | |
* Description: Count a string (mixing English and Chinese characters) length. | |
* A basic and rough function. | |
* | |
* Performance: | |
* Multiple methods performance test on http://jsperf.com/count-string-length. | |
* You can see that using regexp to check range is very slow from the above test page. | |
*/ | |
function strLen(str) { | |
var count = 0; |
const fs = require('fs'); | |
const path = require('path'); | |
const args = process.argv.slice(2); | |
const dir = args[0]; | |
const match = RegExp(args[1], 'g'); | |
const replace = args[2]; | |
const files = fs.readdirSync(dir); | |
files | |
.filter(file => file.match(match)) |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
gem 'rails_12factor'
to your Gemfile. This will add error logging and the ability for your app to serve static assets.bundle
RAILS_ENV=production rake db:create db:migrate db:seed
rake secret
and copy the outputexport SECRET_KEY_BASE=output-of-rake-secret
rake assets:precompile
. This will create a folder public/assets
that contains all of your assets.RAILS_ENV=production rails s
and you should see your app.Remember to clobber your assets (rake assets:clobber
) and re-precompile (rake assets:precompile
) if you make changes.
Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).
First, ssh
to your server, and make sure you have Python and pip
installed. If you have Python but not pip
, install it using the following command
$ sudo apt-get install python3-pip
# Type(<scope>): <subject> | |
# <body> | |
# <footer> | |
# type字段 | |
# add 增加新博客/页面(add new post/page) | |
# correct 改错别字/语法(correct spelling/grammar ) | |
# update 更新内容(update content) |
{ | |
"emojis": [ | |
{"emoji": "👩👩👧👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "👩👩👧👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "👩👩👦👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""}, | |
{"emoji": "👨👩👧👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "👨👩👧👦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "👨👩👦👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "👨&zw |
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository | |
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# http://xiaofan.at | |
# 2 Jul 2015 - Xiaofan | |
# Machine name. | |
function box_name { |