Skip to content

Instantly share code, notes, and snippets.

View thbar's full-sized avatar

Thibaut Barrère thbar

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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:2219708
Created March 27, 2012 19:55 — forked from dominic/gist:1873044
MacRuby App Store manual deployment steps

Submitting to the App Store

First, install Developer certs from Apple's Developer portal

To Build the Application:

  • Select "Your App" from your Scheme menu, NOT "Deployment"
  • Select Product > Archive to build for Release
  • Once completed, the Organizer window will open
  • Select your recent build and press the "Validate" button - make sure this passes!
@thbar
thbar / database.yml
Created April 18, 2012 18:49 — forked from kennym/database.yml
AW-ETL configuration
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
@thbar
thbar / model.coffee
Created May 10, 2012 22:03 — forked from thelinuxlich/model.coffee
Sample Knockout.js model written in Coffeescript
# Modelo base
class @Model
constructor: (defaults,urls) ->
@__defaults = if typeof defaults is "object" then defaults else {}
@__urls = if typeof urls is "object" then defaults else {}
@set(@__defaults)
get: (attr) ->
ko.unwrapObservable @[attr]
@thbar
thbar / knockout-jquery-ui-widget.js
Created May 16, 2012 07:09 — forked from medmunds/knockout-jquery-ui-widget.js
Knockout binding for jQuery.ui.widget
// knockout-jquery-ui-widget.js
// Copyright (c) 2011, Planapple, Inc.
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
//
// Knockout binding for jQuery UI widgets
//
// Examples:
// <input type="submit" value="OK" data-bind='jqueryui: "button"' />
//
// Attaches a jQuery UI button widget to this button, with default options.