Skip to content

Instantly share code, notes, and snippets.

View thbar's full-sized avatar

Thibaut Barrère thbar

View GitHub Profile
@thbar
thbar / proby
Created November 11, 2012 19:15 — forked from jwood/proby
Proby command line wrapper script
#!/bin/bash
#
# This script surrounds the command passed in with start and finish notifications
# to the Proby task monitoring application.
#
#
# === SETUP
#
# * Make sure the proby script is executable.
#
@thbar
thbar / rubymotion_ispeech.md
Created September 9, 2012 18:19 — forked from seanlilmateus/rubymotion_ispeech.md
Integrating RubyMotion and the iSpeech SDK

#Integrating RubyMotion and the iSpeech SDK

As of 19th July 2012, RubyMotion has a couple of issues with external libraries as I discovered when trying the integration, thanks to Laurent, the architect of RubyMotion and with some prompting from Stéphane Wirtel here is the issue and resolution including the code to make the iPhone speak.

Firstly setting up the app, assuming you've already copied the files you need into your vendor/iSpeechSDK directory this is the code needed in the rakefile as per any normal library ...

app.vendor_project('vendor/iSpeechSDK', :static, :products => ["libiSpeechSDK.a"], :headers_dir => "Headers")

@thbar
thbar / get_url_params.js.coffee
Created August 15, 2012 08:57 — forked from thorn/get_url_params.js.coffee
getting url params with coffeescript and jquery
# Returns get parameters.
#
# If the desired param does not exist, null will be returned
#
# To get the document params:
# @example value = $(document).getUrlParam("paramName");
#
# To get the params of a html-attribut (uses src attribute)
# @example value = $('#imgLink').getUrlParam("paramName");
jQuery.fn.extend
@thbar
thbar / parallel_assets_compiler.gemspec
Created August 9, 2012 17:20 — forked from joerichsen/parallel_assets_compiler.gemspec
Microgem for compiling assets in parallel
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = '[email protected]'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@thbar
thbar / gist:3231472
Created August 1, 2012 23:14 — forked from swannodette/gist:3217582
sudoku_compact.clj
(ns sudoku
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
(defn init [vars hints]
@thbar
thbar / tweet_oge_price_signal.rb
Created August 1, 2012 19:39 — forked from JEG2/tweet_oge_price_signal.rb
A simple bot for tweeting OGE's daily price signal
require "rest_client"
require "twitter"
URL = "http://www.oge.com/residential-customers/products-and-services/" +
"Positive-Energy-Smart-Grid/Pages/PriceSignal.aspx"
DATE_RE = Time.now.strftime("%A,\\s+%B\\s+%d,\\s+%Y")
unless ARGV.size == 4
abort "USAGE: #{$PROGRAM_NAME} CONSUMER_KEY CONSUMER_SECRET " +
"OAUTH_TOKEN OAUTH_TOKEN_SECRET"
@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.
@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 / 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 / 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!