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 / 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)
require 'rubygems'
require 'middleman'
run Middleman.server
use Rack::Static,
:urls => ["/stylesheets", "/images"],
:root => "build"
run lambda { |env|
2011-09-15T06:10:35+00:00 heroku[slugc]: Slug compilation finished
2011-09-15T06:10:37+00:00 heroku[web.1]: Starting process with command `thin -p 41476 -e production -R /home/heroku_rack/heroku.ru start`
2011-09-15T06:10:39+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.2.6/lib/sinatra/showexceptions.rb:23:in `rescue in call': undefined method `[]' for #<Rack::Static:0x00000002784cc0> (NoMethodError)
2011-09-15T06:10:39+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.2.6/lib/sinatra/showexceptions.rb:21:in `call'
2011-09-15T06:10:39+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `block in call'
2011-09-15T06:10:39+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.2.6/lib/sinatra/base.rb:1303:in `synchronize'
2011-09-15T06:10:39+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
2011-09-15T06:10:39+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1