Skip to content

Instantly share code, notes, and snippets.

View jongilbraith's full-sized avatar

Jon Gilbraith jongilbraith

  • Cornwall, UK
  • 14:33 (UTC +01:00)
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 22, 2024 15:55
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@IanVaughan
IanVaughan / get_github_repos.rb
Created May 29, 2012 14:03
Quick hack to get a list of all our repos
# curl -u "user:password" https://api.github.com/orgs/:org/repos
require 'httparty'
require 'pp'
class GitHub
include HTTParty
base_uri 'https://api.github.com'
def initialize(u, p)
@titanous
titanous / 0-readme.md
Created October 7, 2011 16:20
Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 requires a minor patch to make ruby-debug19 work. If you have ruby-build and rbenv installed, these scripts will install ruby-1.9.3-p0.

curl https://raw.github.com/gist/1270704/install-ruby-1.9.3-p0.sh | sh
@seven1m
seven1m / templates.js.coffee.erb
Created May 24, 2011 22:24
Render ERB JS templates with Underscore.js and Sprockets and Tilt in Rails 3.1
# creates a global JST object containing all the templates
# 1. install Tilt in your Gemspec
# 2. Paste this in a file at app/assets/javascripts/templates.js.coffee.erb
# 3. `require` the templates file from your main js include file.
# 4. Put your templates at app/views/whatever/my_template.html.jst
window.JST =
<% Dir[Rails.root.join('app/views/**/*.jst')].each do |path| %>
<%= path.match(%r{/([^/]+)\.html\.jst$})[1] %>: _.template(<%= File.read(path).inspect.gsub(/\r?\n/, '') %>)
<% end %>
module SuperRPC
class SuperRPCError < StandardError; end
class UnknownKlass < SuperRPCError; end
class UnknownMethod < SuperRPCError; end
class Unauthorized < SuperRPCError; end
def klasses
@klasses ||= []
end
module_function :klasses