Skip to content

Instantly share code, notes, and snippets.

View gist:827340
<!-- Ours: -->
<div data-role="dialog" data-theme="z" id="options1"><div data-role="header" data-position="inline"><h1>American Sub (Half)</h1></div><div data-role="content" class="page"><form class="options_form" action="" method="get"><div data-role="fieldcontain"><fieldset class="ui-grid-a" data-role="controlgroup" data-type="horizontal"><input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked"><label for="radio-choice-1">Labelness</label></fieldset></div></form></div></div>
<!-- Theirs -->
<div data-role="dialog" data-theme="b" class="ui-dialog ui-page ui-body-a" role="dialog"><div data-role="header" class="ui-corner-top ui-overlay-shadow ui-bar-a ui-header" role="banner"><a href="#" data-icon="delete" data-rel="back" data-iconpos="notext" class="ui-btn-left ui-btn ui-btn-up-a ui-btn-icon-notext ui-btn-corner-all ui-shadow" title="Close" data-theme="a"><span class="ui-btn-inner ui-btn-corner-all"><span class="ui-btn-text
olivierlacan /
Created Jul 17, 2011 — forked from akonan/gist:786127
Added a filename and corrected the namespace (was incorrectly set to "en").
not_found: "ei löytynyt"
already_confirmed: "on jo vahvistettu, yritä kirjautua sisään uudelleen"
not_locked: "ei ollut lukittu"
one: "1 virhe esti %{resource} tallentamisen:"
other: "%{count} virhettä esti %{resource} tallentamisen:"
olivierlacan /
Created Jul 17, 2011 — forked from sozialhelden/
devise i18n translations for icelandic
not_found: "Afsakið, síða ekki fundin."
not_authorized: "Afsakið, auðkenning mistókst"
not_available: "Afsakið, þessu síða er tímabundið niðri."
not_existent: "Afsakið, þessi staður er ekki til lengur."
confirmed: "Aðgangurinn hefur verið staðfestur. Þú ert núna skráður inn"
olivierlacan /
Created Jul 17, 2011 — forked from iqbalhasnan/
Devise Malaysian Translation
# Additional translations at
not_found: "tidak dijumpai"
already_confirmed: "sudah disahkan"
not_locked: "tidak dikunci"
olivierlacan / cleverButton.css.sass
Created Aug 6, 2011
cleverButton Sass mixin for Compass
View cleverButton.css.sass
// ##### cleverButton #####
// # Version: 0.3
// # Description: Sass mixin for Compass to create fully styled buttons.
// # Notes: this mixin uses Compass mixin, see for
// # installation instructions.
// # Authors: Olivier Lacan, Andrew Smith
// ### changelog
// # v0.1: July 2010, initial version
// # v0.2: Added edge extendable edge styles
// # v0.3: Added Compass CSS3 mixins for reduced code & better browser support
olivierlacan / sublime-text-2-settings.json
Last active Sep 26, 2015
Basic Sublime Text 2 settings for Rails development
View sublime-text-2-settings.json
"use_simple_full_screen": false,
// calculates indentation automatically when pressing enter
"auto_indent": true,
// sets the colors used within the text area (default)
// see to download
// the customized Monokai I use.
"color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme",
olivierlacan / testing-invalid-params-with-respond_with
Created Aug 17, 2011
Issue testing create action with invalid parameters when using respond_to/respond_with in Rails 3.x
View testing-invalid-params-with-respond_with
# Issue testing create action with invalid parameters when using respond_to/respond_with in Rails 3.x
When a new "thing" is saved without invalid params, the respond_with behavior is to render :new again.
But since the form has been submitted to :root/things/, what actually displays in the browser is http://:root/things and not http://:root/things/new.
Somehow this confuses the render_template test in RSpec and it believes the current template is "" instead of "new", which results in a failed test.
The only solution I found was to write the create action like this:
respond_with @thing
olivierlacan /
Created Aug 31, 2011 — forked from JeanMertz/
Ruby on Rails syntax highlight switcher for Sublime Text 2
# ======================================================================================= #
# NOTE: This is relatively outdated, you should use the DetectSyntax package
# from Package Control instead:
# ======================================================================================= #
# Instructions: put this inside of the following folder on a Mac:
# /Users/<yourusername>/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
# ======================================================================================= #
import sublime, sublime_plugin
import os
View snippet.txt
My _colors partial seemed to be the one causing compile errors, I first commented out the big mixin inside of _buttons to see if it was causing the issues, without success. I then removed all @imports of _buttons & _colors, which only reduced compile time to 10 seconds
After disabling inclusion of my _colors partial & _buttons partials.
My app, subsequent run, webrick:
Started GET "/assets/application.css" for at 2011-09-01 09:33:56 -0400
Compiled pages.css (232ms) (pid 71666)
Compiled style.css (8404ms) (pid 71666)
Compiled users.css (1889ms) (pid 71666)
Compiled application.css (18ms) (pid 71666)
Served asset /application.css - 200 OK (10591ms)
olivierlacan / launch_sublime_from_terminal.markdown
Created Sep 5, 2011
Launch Sublime Text 2 from the Mac OS X Terminal
View launch_sublime_from_terminal.markdown

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\

You can find more (official) details about subl here: