Skip to content

Instantly share code, notes, and snippets.

View olivierlacan's full-sized avatar

Olivier Lacan olivierlacan

View GitHub Profile
<!-- 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="http://mdd1102.reactivepixel.com/gateway.php" 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
olivierlacan / devise.fi.yml
Created July 17, 2011 20:20 — forked from akonan/gist:786127
Added a filename and corrected the namespace (was incorrectly set to "en").
fi:
errors:
messages:
not_found: "ei löytynyt"
already_confirmed: "on jo vahvistettu, yritä kirjautua sisään uudelleen"
not_locked: "ei ollut lukittu"
not_saved:
one: "1 virhe esti %{resource} tallentamisen:"
other: "%{count} virhettä esti %{resource} tallentamisen:"
@olivierlacan
olivierlacan / devise.is.yml
Created July 17, 2011 21:45 — forked from sozialhelden/devise.is.yml
devise i18n translations for icelandic
is:
errors:
messages:
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."
devise:
confirmations:
confirmed: "Aðgangurinn hefur verið staðfestur. Þú ert núna skráður inn"
@olivierlacan
olivierlacan / devise.my.yml
Created July 17, 2011 23:08 — forked from iqbalhasnan/devise.my.yml
Devise Malaysian Translation
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
my:
errors:
messages:
not_found: "tidak dijumpai"
already_confirmed: "sudah disahkan"
not_locked: "tidak dikunci"
devise:
@olivierlacan
olivierlacan / cleverButton.css.sass
Created August 6, 2011 22:34
cleverButton Sass mixin for Compass
// ##### cleverButton #####
// # Version: 0.3
// # Description: Sass mixin for Compass to create fully styled buttons.
// # Notes: this mixin uses Compass mixin, see http://compass-style.org 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
olivierlacan / sublime-text-2-settings.json
Last active January 11, 2024 15:38
Basic Sublime Text 2 settings for Rails development
{
"use_simple_full_screen": false,
// calculates indentation automatically when pressing enter
"auto_indent": true,
// sets the colors used within the text area (default)
// see https://github.com/olivierlacan/monokaim to download
// the customized Monokai I use.
"color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme",
@olivierlacan
olivierlacan / testing-invalid-params-with-respond_with
Created August 17, 2011 13:56
Issue testing create action with invalid parameters when using respond_to/respond_with in Rails 3.x
# 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:
if @thing.save
respond_with @thing
@olivierlacan
olivierlacan / syntax_highlighting.py
Created August 31, 2011 14:47 — forked from JeanMertz/syntax_highlighting.py
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: http://wbond.net/sublime_packages/community#sort-installs
# ======================================================================================= #
# 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
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 127.0.0.1 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
olivierlacan / launch_sublime_from_terminal.markdown
Created September 5, 2011 15:50
Launch Sublime Text 2 from the Mac OS X Terminal

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\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation