This is pretty specific to my setup but the idea can be adapted to work with pretty much anything.
Go has a flag package which makes parsing command line arguments really easy.
package main
This is pretty specific to my setup but the idea can be adapted to work with pretty much anything.
Go has a flag package which makes parsing command line arguments really easy.
package main
## Rails Upgrade check | |
# | |
# Check your github repos for out of date rails apps | |
# | |
# usage: $ USERNAME=yourusername PASSWORD=yourpassword ruby railscheck.rb | |
# or | |
# usage: $ USERNAME=yourusername PASSWORD=yourpassword ORG=yourorgname ruby railscheck.rb | |
# | |
# n.b requires the octokit gem |
package main | |
import ( | |
"database/sql" | |
"errors" | |
"fmt" | |
_ "github.com/bmizerany/pq" | |
"os" | |
"regexp" | |
"strings" |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
ticker := rateLimit(4, 10) |
There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.
Get a Linode VM in the UK. The 512MB server for $20 works just fine. (If you want to use my referral link, go for it: http://bit.ly/OuzdVe)
Follow the standard OpenVPN installation documentation. (Basically, 'apt-get install openvpn' or 'yum install openvpn' and then follow these docs: http://openvpn.net/index.php/open-source/documentation/howto.html). For an OS X client, I prefer Viscosity: http://www.thesparklabs
When working with large, high volume, low latency systems, it is often the case that processing data sequentially becomes detrimental to the system's health. If we only allow 1 process to work on our data we run into several challenges:
class Dir | |
def self.glob_without(pattern, regexp, directory = pwd) | |
chdir(directory) do | |
glob(pattern).reject {|i| i =~ regexp }.map {|i| File.expand_path(i) } | |
end | |
end | |
end |