This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| #Deploy and rollback on Heroku in staging and production | |
| task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| namespace :deploy do | |
| PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
| STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
| task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
| task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |
| # how to name keys in redis for keyvalue stores | |
| http://code.google.com/p/redis/wiki/TwitterAlikeExample | |
| http://rediscookbook.org/introduction_to_storing_objects.html | |
| http://www.slideshare.net/playnicelyapp/redis-schema-design-for-playnicely-redis-london-meetup | |
| antirez has a book about keyvalue design in the pipeline | |
| http://code.google.com/p/redis/wiki/IntroductionToRedisDataTypes | |
| schema: | |
| <namespace>:<globalObject> |
| def merge(left, right): | |
| if not len(left) or not len(right): | |
| return left or right | |
| result = [] | |
| i, j = 0, 0 | |
| while (len(result) < len(left) + len(right)): | |
| if left[i] < right[j]: | |
| result.append(left[i]) | |
| i+= 1 |
| Vagrant.configure("2") do |config| | |
| # Use Ubuntu 12.04 64-bit for now. | |
| config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1" | |
| config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| # Provision the VM | |
| config.vm.provision :shell, :path => "vagrant_data/install.sh" | |
| # Configure network | |
| config.vm.network :private_network, ip: "192.168.50.4" |
| font-family:'Avenir LT W01 35 Light'; | |
| font-family:'AvenirLTW01-35LightObli'; | |
| font-family:'Avenir LT W01 45 Book'; | |
| font-family:'AvenirLTW01-45BookObliq'; | |
| font-family:'Avenir LT W01 55 Roman'; | |
| font-family:'AvenirLTW01-55Oblique'; | |
| font-family:'Avenir LT W01 65 Medium'; | |
| font-family:'AvenirLTW01-65MediumObl'; | |
| font-family:'Avenir LT W01 85 Heavy'; | |
| font-family:'AvenirLTW01-85HeavyObli'; |
| #!/usr/bin/env python | |
| import os, sys | |
| sys.path.append(os.getcwd()) | |
| import logging | |
| import rq | |
| MAX_FAILURES = 3 |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| var arr = { | |
| max: function(array) { | |
| return Math.max.apply(null, array); | |
| }, | |
| min: function(array) { | |
| return Math.min.apply(null, array); | |
| }, | |
| range: function(array) { |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| # Forward Apache | |
| config.vm.network :forwarded_port, guest: 80, host: 8000 | |
| # Forward MySQL | |
| config.vm.network :forwarded_port, guest: 3306, host: 3307 | |