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 |
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
Show hidden characters
{ | |
"cmd": ["make", "clean"], | |
"cmd": ["make", "html"], | |
"working_dir": "${project_path:${folder}}", | |
"selector": "text.restructuredtext" | |
} |
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
.markdown-here-wrapper { | |
font-family: STheiti, 'Open Sans'; | |
padding: 1em; | |
} | |
hr { | |
border: 3px dotted #009688; | |
} | |
em, i, a { |
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
defaults write com.apple.dashboard mcx-disabled -boolean YES | |
kill all dock |
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") |