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
| # API Reference¶ | |
| The WebFaction [XML-RPC](http://en.wikipedia.org/wiki/XML-RPC) API provides | |
| methods to make many account tasks scriptable. This documentation is a | |
| complete reference to all of the possible API methods. | |
| Please note that XML-RPC parameters are positional (order matters), and many | |
| parameters are required. Parameters may only be omitted if omitted parameters | |
| have default values and follow all other parameters to which you have supplied | |
| a value. |
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
| if not set -q AUTOENVFISH_FILE | |
| set -g AUTOENVFISH_FILE ".env.fish" | |
| end | |
| # Automatic env loading | |
| function _autoenvfish --on-variable PWD | |
| if status --is-command-substitution # doesn't work with 'or', inexplicably | |
| return | |
| end |
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 'java' | |
| java_import 'java.util.concurrent.ThreadPoolExecutor' | |
| java_import 'java.util.concurrent.TimeUnit' | |
| java_import 'java.util.concurrent.LinkedBlockingQueue' | |
| java_import 'java.util.concurrent.FutureTask' | |
| java_import 'java.util.concurrent.Callable' | |
| java_import 'java.util.concurrent.Executors' | |
| ### SETTINGS |
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 "rubygems" | |
| require "twitter" | |
| require "json" | |
| # things you must configure | |
| TWITTER_USER = "your_username" | |
| MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
| # get these from dev.twitter.com | |
| CONSUMER_KEY = "your_consumer_key" |
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
| # shove this in ~/.chef/bootstrap/joyent-smartos.erb | |
| # run knife bootstrap <hostname> -d joyent-smartos | |
| bash -c ' | |
| if [ ! -f /opt/local/bin/chef-client ]; then | |
| cd /tmp | |
| pkgin -y install gcc-compiler gcc-runtime gcc-tools-0 ruby19 scmgit-base scmgit-docs gmake | |
| wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz | |
| tar -xzf rubygems-1.8.10.tgz | |
| cd rubygems-1.8.10 |
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
| -(void)drawInContext:(CGContextRef)myContext { | |
| CGContextSaveGState(myContext);// 6 | |
| CGFloat potentialFlip = 1.0; | |
| CGFloat shadowBlur = 4; | |
| CGFloat shadowOffset = 4; | |
| CGFloat shadowOffsetNeg = shadowOffset * -1.0; | |
| CGFloat x = self.bounds.origin.x + shadowOffset; | |
| CGFloat y = self.bounds.origin.y + shadowOffset; | |
| CGFloat wd = self.bounds.size.width - (shadowOffset * 2); |
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
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:[email protected]", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
NewerOlder