This file contains 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
{ | |
"color_scheme": "Packages/User/textmate-solarized/Solarized (Dark).tmTheme", | |
// "color_scheme": "Packages/User/textmate-solarized/Solarized (Light).tmTheme", | |
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night-Eighties.tmTheme", | |
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night-Bright.tmTheme", | |
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night.tmTheme", | |
"font_size": 12, | |
"font_face": "menlo", | |
// "font_face": "monaco", | |
// "font_face": "Inconsolata", |
This file contains 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
FIXME: | |
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8 | |
or | |
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found | |
gem uninstall nokogiri libxml-ruby | |
brew update | |
brew uninstall libxml2 |
This file contains 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
# -*- encoding: utf-8 -*- | |
require 'digest/md5' | |
require 'nestful' | |
class Smsbao | |
attr_accessor :login, :passwd | |
def initialize(login, passwd) | |
@login = login | |
@passwd = Digest::MD5.hexdigest(passwd) |
This file contains 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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
This file contains 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
# default.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
schema_list: | |
- schema: luna_pinyin # 朙月拼音 | |
- schema: terra_pinyin # 地球拼音 dì qiú pīn yīn |
This file contains 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
#!/user/bin/env bash | |
on_die() { | |
echo | |
echo byebye proxy | |
echo | |
networksetup -setsocksfirewallproxystate "Ethernet 2" off #close the proxy | |
# the name can be "wifi" or "Ethernet 1", just see what is listed in "network preference" | |
} |
This file contains 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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html | |
This file contains 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
// Original by C0D312 | |
// I added the single quote and curly brace to the regex. | |
// http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5174 | |
// | |
// Add the following to your user keybindings: | |
[ | |
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context": | |
[ | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)}'\"\\]]", "match_all": true }, |
This file contains 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
import functools | |
import random | |
import math | |
from concurrent import futures | |
def map_d(c): | |
return math.hypot(random.random(), random.random()) | |
This file contains 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
#!/usr/bin/env python | |
def pi(): | |
# Wallis' product | |
numerator = 2.0 | |
denominator = 1.0 | |
while True: | |
yield numerator/denominator | |
if numerator < denominator: | |
numerator += 2 |
OlderNewer