Skip to content

Instantly share code, notes, and snippets.

Problem-Solving Games

My daughter and I love playing problem-solving games together. After completing a few I asked for recommendations on Twitter. Here's the list.

Completed

@towanda
towanda / app.rb
Created November 12, 2012 11:25 — forked from pacoguzman/app.rb
Testing jquery-ui sortable with capybara
# Run via: ruby -rubygems app.rb
require 'sinatra'
require 'haml'
disable :logging
get '/' do
title = "Drag'n'drop issue reduction"
haml :index
end
@towanda
towanda / hack.sh
Created April 1, 2012 09:14 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#
@towanda
towanda / default.vcl.pl
Created March 13, 2012 12:39 — forked from bmarini/default.vcl.pl
A good varnish config for a Rails app
# https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html
# https://www.varnish-cache.org/trac/wiki/VCLExamples
# Summary
# 1. Varnish will poll the backend at /health_check to make sure it is
# healthy. If the backend goes down, varnish will server stale content
# from the cache for up to 1 hour.
# 2. Varnish will pass X-Forwarded-For headers through to the backend
# 3. Varnish will remove cookies from urls that match static content file
# extensions (jpg, gif, ...)
@towanda
towanda / gist:1744992
Created February 5, 2012 11:58 — forked from ambar/gist:1534274
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
@towanda
towanda / gist:312351
Created February 23, 2010 16:14 — forked from qrush/gist:296921
gemcutter stats
gemcutter => redis downloads spec
=================================
keys
----
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
# Add a bunch of twitter users to one of your twitter lists
#
# use it with a file full of twitter usernames
# one name by line
#
# If the listname indicated doesn't exist it will be created
#
# Example: $ ruby twitter_lists.rb 'username' 'userpass' 'listname' twitter_users.txt
#
# Debug mode: $ ruby twitter_lists.rb 'username' 'userpass' 'listname' twitter_users.txt debug