Skip to content

Instantly share code, notes, and snippets.

View hubb's full-sized avatar
🕳️
🐇

Thibault Gautriaud hubb

🕳️
🐇
View GitHub Profile
@hubb
hubb / Preferences.sublime-settings
Last active December 25, 2015 14:29
Sublime config
{
"color_scheme": "Packages/Base16/base16-tomorrow.dark.tmTheme",
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
@hubb
hubb / haml-4.0-railtie-patched.diff
Created June 9, 2013 17:28
Patch for ree-1.8.7 and Haml 4.0.3 ~/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb
diff --git a/Users/hubb/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb b/Users/hubb/Desktop/railtie-patched.rb
index 4d3e34f..4e354a2 100644
--- a/Users/hubb/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb
+++ b/Users/hubb/Desktop/railtie-patched.rb
@@ -1,22 +1,26 @@
if defined?(ActiveSupport)
require 'haml/template/options'
- ActiveSupport.on_load(:before_initialize) do
- ActiveSupport.on_load(:action_view) do
- require "haml/template"
@hubb
hubb / gem install mysql2 - fail
Last active December 17, 2015 00:19
Tweak mysql_config to properly install mysql2 gem with 10.8 and MySQL installed from dmg (only found solutions for Homebrew)
$ sudo gem install --no-rdoc --no-ri mysql2 --version 0.2.11 -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/hubb/.rbenv/versions/1.9.3-p0/bin/ruby extconf.rb --with-mysql-dir=/usr/local/mysql-5.6.11-osx10.7-x86_64 --with-mysql-config=/usr/local/mysql-5.6.11-osx10.7-x86_64/bin/mysql_config --with-opt-include=/usr/local/mysql-5.6.11-osx10.7-x86_64/include
checking for rb_thread_blocking_region()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
@hubb
hubb / gist:2996383
Created June 26, 2012 15:17 — forked from travis/gist:1084767
testing facebook connect with capybara and rspec
require 'mogli'
module FacebookIntegrationHelpers
shared_context "with unconnected facebook user" do
let(:fb_user) { create_test_user(installed: false) }
after { fb_user.destroy }
end
def app_client
Mogli::AppClient.new(AppConfig.facebook.access_token, AppConfig.facebook.app_id)