This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"color_scheme": "Packages/Material Theme/schemes/OLD/Material-Theme-Darker.tmTheme", | |
"default_encoding": "UTF-8", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export 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" | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://ruby.taobao.org" | |
ruby "2.1.6" | |
### Main | |
gem 'rails', '4.2.3'#, github: 'rails/rails' | |
gem 'sdoc', '~> 0.4.0', group: :doc # Document is **IMPORTANT**, `bin/rake doc:rails` | |
gem 'pg' # Postgresql Driver | |
gem "redis", "~> 3.1", require: ["redis/connection/hiredis", "redis"] | |
gem "hiredis" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params = { | |
bucket: "your_bucket", | |
key: "j7m3jm9io.mp4", | |
fops: "avthumb/mp4/vcodec/libx264/vb/512k/r/24/vb/256k/acodec/libfaac/ab/64k|saveas/bGFpMWtlLWRldjpnb3Uyem9yaWRqbnN0dDktbWVkaXVtLm1wNA==", | |
pipeline: "neolion", | |
notifyURL: "http://example.com/callback/qiniu_transcoded/23" | |
} | |
http_code, resp = Qiniu::Fop::Persistance.pfop params |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# _ooOoo_ | |
# o8888888o | |
# 88" . "88 | |
# (| -_- |) | |
# O\ = /O | |
# ____/`---'\____ | |
# . ' \\| |// `. | |
# / \\||| : |||// \ | |
# / _||||| -:- |||||- \ | |
# | | \\\ - /// | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function numberToChinese(number) { | |
var UNIT = ['', '十', '百']; | |
var NUMBER = ['', '一', '二', '三', '四', '五', '六', '七', '八', '九']; | |
if (number == 0) { | |
return '零'; | |
} | |
if (number > 999) { | |
throw new Error('Too Big'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'securerandom' | |
module ActiveSupport | |
module Notifications | |
# Instrumenters are stored in a thread local. | |
class Instrumenter | |
attr_reader :id | |
def initialize(notifier) | |
@id = unique_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
file_paths = Dir.glob("/BACKUP_DIR/*.dump") | |
file_paths.map! do |file_path| | |
basename = File.basename(file_path, '.dump') | |
key = Date.parse(basename) | |
[key, file_path] | |
end.sort! do |a, b| | |
a[0] <=> b[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2014-10-27T00:24:17-07:00] INFO: Forking chef instance to converge... | |
[2014-10-27T00:24:17-07:00] INFO: *** Chef 11.10.4 *** | |
[2014-10-27T00:24:17-07:00] INFO: Chef-client pid: 11300 | |
[2014-10-27T00:24:17-07:00] WARN: Run List override has been provided. | |
[2014-10-27T00:24:17-07:00] WARN: Original Run List: [] | |
[2014-10-27T00:24:17-07:00] WARN: Overridden Run List: [role[rails_srv]] | |
[2014-10-27T00:24:17-07:00] INFO: Run List is [role[rails_srv]] | |
[2014-10-27T00:24:17-07:00] INFO: Run List expands to [ruby, memcached, nginx::source, redisio::install] | |
[2014-10-27T00:24:17-07:00] INFO: Starting Chef Run for ubuntu | |
[2014-10-27T00:24:17-07:00] INFO: Running start handlers |