Skip to content

Instantly share code, notes, and snippets.

View thbar's full-sized avatar

Thibaut Barrère thbar

View GitHub Profile
@thbar
thbar / syntax_highlighting.py
Created March 21, 2012 14:28 — forked from JeanMertz/syntax_highlighting.py
Ruby on Rails syntax highlight switcher for Sublime Text 2
import sublime, sublime_plugin
import os
class DetectFileTypeCommand(sublime_plugin.EventListener):
""" Detects current file type if the file's extension isn't conclusive """
""" Modified for Ruby on Rails and Sublime Text 2 """
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """
def on_load(self, view):
filename = view.file_name()
@thbar
thbar / gist:2112045
Created March 19, 2012 13:26 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p0
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1333785)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p0 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@thbar
thbar / rsync-server-gist.nsi
Created February 14, 2012 13:59 — forked from unicolet/rsync-server-gist.nsi
Nullsoft script to create an installer for a rsync Windows Service package based on cygwin
;NSIS Modern User Interface
;Rsync Windows Service Script
;Written by Umberto Nicoletti http://unicolet.blogspot.com/
!define SCRIPT_VERSION "1.0"
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
@thbar
thbar / knife.rb
Created February 2, 2012 14:00 — forked from wilmoore/knife.rb
Base "knife" configuration for a standard chef-solo setup
# .chef/knife.rb
# SEE: http://wiki.opscode.com/display/chef/Troubleshooting+and+Technical+FAQ
# set some sensible defaults
current_dir = File.dirname(__FILE__)
user = ENV['OPSCODE_USER'] || ENV['USER']
log_level :debug
log_location STDOUT
node_name `hostname`
client_key ''
@thbar
thbar / knife.rb
Created February 2, 2012 12:57 — forked from doitian/knife.rb
Configuration files for chef-solo and knife, so they all use directories inside the chef repo, instead of default global pathes such as /etc, /var
log_level :info
log_location STDOUT
node_name 'solo'
client_key File.expand_path('../solo.pem', __FILE__)
cache_type 'BasicFile'
cache_options( :path => File.expand_path('../checksums', __FILE__))
cookbook_path [ File.expand_path('../../cookbooks', __FILE__) ]
@thbar
thbar / gist:1697974
Created January 29, 2012 09:14 — forked from incanus/gist:1439543
Hubot update script
#!/bin/sh
# Script by @incanus to update Hubot from release tarballs since
# repo tags are meant for development.
if [ -z $1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
@thbar
thbar / vagrant-capistrano
Created December 13, 2011 09:45 — forked from fadhlirahim/vagrant-capistrano
Vagrant capistrano config bit
# Don't forget to run this vagrant command first
# vagrant ssh-config >> ~/.ssh/config
set :user, 'vagrant'
set :run_method, :sudo
role :app, '33.33.33.10'
ssh_options[:keys] = `vagrant ssh_config | grep IdentityFile`.split.last
@thbar
thbar / rvm-install.sh
Created December 1, 2011 17:06 — forked from robinator/rvm-install.sh
RVM installation for Flywheel
## As root
# https://rvm.beginrescueend.com/rvm/install/
groupadd rvm
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# add below to ~/.bash_profile at bottom (for both root and deploy)
[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'
# add below to ~/.gemrc at bottom (for both root and deploy)
install: --no-rdoc --no-ri
@thbar
thbar / nokogiri
Created November 21, 2011 08:38
Getting Nokogiri to install on Lion
# using rvm with ruby-1.9.2
# latest version 2.7.8 2011-09-16
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar xvfz libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.8
@thbar
thbar / _gradients.css.scss
Created October 27, 2011 11:28 — forked from mihar/_gradients.sass
SCSS mixing for CSS3 gradients
@mixin gradient($from, $to) {
/* fallback/image non-cover color */
background-color: $from;
/* Firefox 3.6+ */
background-image: -moz-linear-gradient($from, $to);
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));