Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| #!/usr/bin/env python2 | |
| from gi.repository import Gtk, GObject, GLib | |
| import os | |
| import os.path | |
| class File(object): | |
| def __init__(self, file_name, place_holder=False, directory=True, root=False, empty=False): | |
| self.file_name = file_name |
| # Save this in an empty directory as Vagrantfile and run: | |
| # | |
| # gem install vagrant | |
| # vagrant up | |
| # vagrant ssh | |
| # | |
| # You need to have a recent VirtualBox installed. | |
| Vagrant::Config.run do |config| | |
| config.vm.box = "travis-ruby" | |
| config.vm.box_url = "http://files.travis-ci.org/boxes/provisioned/travis-ruby.box" |
| # -*- coding: utf-8 -*- | |
| import os | |
| from flask import Flask | |
| from flask_heroku import Heroku | |
| from flask_sslify import SSLify | |
| from raven.contrib.flask import Sentry | |
| from flask.ext.celery import Celery |
This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
| # Convert any YouTube video into an audio file you can listen to on the go, using: | |
| # http://rg3.github.com/youtube-dl/ | |
| { ~ } > brew install ffmpeg | |
| { ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
| { ~ } > chmod u+x youtube-dl | |
| # Pick which video format you want to download.. (use any YT video link) | |
| { ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os |
| source :rubygems | |
| gem 'terminal-notifier' | |
| gem 'pusher-client', :git => 'git://github.com/pusher/pusher-ruby-client.git' |