- download
- Edit your
.autotest
and add this line:Autotest::Growl::image_dir = File.expand_path("~")+'/Dropbox/Public/fu'
(or wherever you unpacked fu.zip) - ???????
- Profit!
This guide will show how to setup a VirtualBox similiar to an Ubuntu 12.04.1 server for use with Amazon EC2.
Covered in this guide:
- VeeWee: Tool for building base boxes which will be used by vagrant
- Vagrant: Tool for managing virtual machines with an easy to use CLI
- Librarian: Bundler for chef cookbooks
- Chef-solo & Knife solo: Tool for automating installing and management of servers
Because loading gems can take longer than you think
Now available as a gem - get it here
This file contains 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
// create new card | |
$('.js-add-list-popover').click(); | |
var d = new Date(); | |
var year = (d.getFullYear()+'').substring(2); | |
var month = d.getMonth() + 1; | |
var day = d.getDate(); | |
var cardName = 'Published (' + month + '-' + day + '-' + year + ')'; | |
$('.js-list-name').val(cardName); |
This file contains 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
#!/usr/bin/env bash | |
# Purpose: To create a bootable (USB) drive on OSX | |
# Note: For a NixOS 14.12 ISO (~330MB) to a 512MB USB drive, the last step (rsync) took over 3 minutes. | |
declare -r platform="$(uname -s)" | |
if [ "${platform}" != "Darwin" ]; then | |
>&2 echo "Error: This will not run on ${platform} (anything other than Darwin." | |
exit 1 | |
fi |
This file contains 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
#!/usr/bin/env ruby | |
# ... | |
preprocess do | |
RedirectGenerator.generate(config[:redirects], items) | |
end | |
route '/old_posts/*' do | |
item.identifier.sub('old_posts/', '') + 'index.html' |
This file contains 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
class Module | |
# We often find ourselves with a medium-sized chunk of behavior that we'd | |
# like to extract, but only mix in to a single class. | |
# | |
# We typically choose to leave the implementation directly in the class, | |
# perhaps with a comment, because the mental and visual overhead of defining | |
# a module, making it a Concern, and including it is just too great. | |
# | |
# | |
# Using comments as lightweight modularity: |
This file contains 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
# yes, sometimes you need to do this. you get pilloried in a forum if you | |
# ask about it, though! | |
# this code taken from | |
# http://wholemeal.co.nz/blog/2011/04/05/rendering-from-a-model-in-rails-3/ | |
class MyModel < ActiveRecord::Base | |
# Use the my_models/_my_model.txt.erb view to render this object as a string | |
def to_s | |
ActionView::Base.new(Rails.configuration.paths.app.views.first).render( |
This file contains 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 'singleton' | |
# outputs a colored call-trace graph to the Rails logger of the lines of ruby code | |
# invoked during a single request. | |
# | |
# Example: | |
# | |
# 1) Make sure this file is loaded in an initializer | |
# | |
# 2) Add the following to your application.rb in Rails3: |
This gist is no longer valid. Please see Compass-Rails for instructions on how to install.