Replace in your config/application.rb
require "rails/all"
with:
require "rails"
// Using grand central dispatch (GCD) so we don't block the GUI | |
dispatch_async(dispatch_get_global_queue(0, 0), ^{ | |
// Background, long stuff runs here, but doesn't affect the GUI | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
// The GUI thread stuff goes here | |
[self.tableView reloadData]; // example | |
#!/usr/bin/env perl | |
# You can use this script in a pipe. It's input will become an emacs buffer | |
# via emacsclient (so you need server-start etc.) | |
# See http://mark.aufflick.com/o/886457 for more information | |
# Copyright (C) 2011 by Mark Aufflick <mark@aufflick.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
#!/usr/bin/perl | |
# Usage: perl opml2org.pl "My OPML File.opml" | |
use XML::Parser; | |
binmode STDOUT, ":utf8"; | |
$xp = new XML::Parser(); | |
$xp->setHandlers(Start => \&start, End => \&end); | |
$xp->parsefile($ARGV[0]); | |
$indent = 0; |
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix. | |
;; | |
;; * :use makes functions available without a namespace prefix | |
;; (i.e., refers functions to the current namespace). | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; |
# Nginx+Unicorn best-practices congifuration guide. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
# See http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-set_trace_func for docs on this function | |
require 'ostruct' | |
module Friendly | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
def method_missing(name, *args, &block) |
;; emacs configuration | |
(add-to-list 'load-path "~/.emacs.d/el-get/el-get") | |
(unless (require 'el-get nil 'noerror) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
"https://raw.github.com/dimitri/el-get/master/el-get-install.el") | |
(let (el-get-master-branch) | |
(goto-char (point-max)) |
# 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") |