This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb
This requires you have the 'image_optim' gem and it's dependencies.
This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb
This requires you have the 'image_optim' gem and it's dependencies.
I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!
When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:
First, I made a file in my ~/bin
called rdio
that runs:
google-chrome --app=http://rdio.com
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson ([email protected]) | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so | |
# WP's redirect_canonical doesn't do an infinite redirect of / |
http://stackoverflow.com/questions/68569/text-watermark-on-website-how-to-do-it | |
<style type="text/css"> | |
#watermark { | |
color: #d0d0d0; | |
font-size: 200pt; | |
-webkit-transform: rotate(-45deg); | |
-moz-transform: rotate(-45deg); | |
position: absolute; | |
width: 100%; |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
context 'performance' do | |
before do | |
require 'benchmark' | |
@posts = [] | |
@users = [] | |
8.times do |n| | |
user = Factory.create(:user) | |
@users << user | |
aspect = user.aspects.create(:name => 'people') | |
connect_users(@user, @aspect0, user, aspect) |
require 'rubygems' | |
require 'test/unit' | |
require 'em-http' | |
require 'vcr' | |
VCR.config do |c| | |
c.cassette_library_dir = 'fixtures/vcr_cassettes' | |
c.http_stubbing_library = :webmock | |
end |
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
# If you'd like this packaged up as a gem, send me a note. You can get | |
# in touch with me at http://www.techiferous.com/about | |
require 'nokogiri' | |
require 'ispell' | |
module Rack | |
class SpellCheck | |
def initialize(app, options = {}) |
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! | |
# |