A Homebrew formula for installing PulseAudio on OS X.
Tested on Lion, and at the moment requires the 10.7 SDK.
brew install https://raw.github.com/gist/1633642/pulseaudio.rb
# x.6 likes to not use it on some displays and removes the ui for setting it manually | |
# see http://www.macosxhints.com/article.php?story=20090828224632809 | |
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2 |
http://blog.new-bamboo.co.uk/2010/1/26/why-your-javascript-apps-need-more-structure | |
http://blog.new-bamboo.co.uk/2010/2/4/let-them-eat-state | |
http://blog.new-bamboo.co.uk/2010/3/7/the-js-model-layer | |
http://blog.new-bamboo.co.uk/2010/2/8/rendering-views-in-javascript | |
Controllers: | |
http://code.quirkey.com/sammy/ - Sammy is a tiny javascript framework built on top of jQuery. It’s RESTful Evented JavaScript. |
def pbcopy(string) | |
pasteBoard = NSPasteboard.generalPasteboard | |
pasteBoard.declareTypes([NSStringPboardType], owner: nil) | |
pasteBoard.setString(string, forType: NSStringPboardType) | |
end |
Handlebars.registerHelper 'each_with_index', (array, fn) -> | |
buffer = '' | |
for i in array | |
item = i | |
item.index = _i | |
buffer += fn(item) | |
buffer |
class Forum | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
field :posts_count, :type => Integer, :default => 0 | |
has_many_related :posts | |
end |
<?php | |
/** | |
* Duplicate this file as many times as you would like, just be sure to change the | |
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com | |
* | |
* Plugin Name: Empty Widget | |
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs. | |
* Author: RedRokk Interactive Media | |
* Version: 1.0.0 | |
* Author URI: http://www.redrokk.com |
# This is Neocities' Rainbows! config file. We are using this in production to run all our web apps. | |
# It works really well for us and has been heavily load tested, so I wanted to share it with the community. | |
# | |
# In my opinion, this is the best way to deploy a ruby web application. Unlike EventMachine based solutions, | |
# it uses real ruby threads, which allows it to take advantage of the internal non-blocking IO pattern | |
# in MRI. | |
# | |
# Contrary to popular belief, MRI doesn't block execution to wait on IO when you are using threads, even | |
# with the GIL. The requests are done concurrently for anything that is based on the IO class. This | |
# includes things like Net::HTTP and even `system commands`. Grep the MRI Ruby source code for |
A Homebrew formula for installing PulseAudio on OS X.
Tested on Lion, and at the moment requires the 10.7 SDK.
brew install https://raw.github.com/gist/1633642/pulseaudio.rb
# encoding: UTF-8 | |
# requires ruby 1.9.3 and up | |
# gem install nokogiri typhoeus | |
require 'nokogiri' | |
require 'typhoeus' | |
module Imgur | |
class AlbumDownloader |
# 2. Include Sweeping module in your controller(s) to have cache_sweeper | |
# method to be avaliable, or right in ApplicationController so it will be | |
# available in all controllers inheriting from it. | |
class ApplicationController < ActionController::Base | |
include ActionController::Caching::Sweeping | |
# ... | |
end |