Skip to content

Instantly share code, notes, and snippets.

View olivierlacan's full-sized avatar

Olivier Lacan olivierlacan

View GitHub Profile
@olivierlacan
olivierlacan / gist:5608432
Created May 19, 2013 18:00
Rails 4 doesn't like Bundler's binstubs. This is what happens when you upgrade to Rails 4 RC1 with Bundler binstubs installed.
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
In Rails 4, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
@olivierlacan
olivierlacan / dove_response.md
Last active December 16, 2015 08:59
Answer to @aimeesimone's [interesting opinion piece](http://happymediumblog.com/posts/53) on the Dove Real Beauty Sketches video

To me they did a good job of emphasizing the contrast between the self-perception and the third-party perception of these womens' faces.

I'm not sure I follow the stigma you seem to convey about "traditionally beautiful adjectives". Some of these women had long faces, large teeth, wrinkles. All attributes that were the center of their attention despite never being the focus of the people who looked at them.

I have a hard time understanding how it is exploitative — this terms still bothers me in itself because it's utterly vague — for this video to compare and contrast how strangers synthesize a woman's physical presence against the way they see themselves.

"The lesson for these women is that they aren't as ugly as they thought, and in fact they fit right in with traditional beauty standards."

No, that's your — actually cynical, in this instance — interpretation. What is shown in the video is the clear emphasis of several of these women on their lesser physical traits (wrinkles, unease, tired eyes, impe

@olivierlacan
olivierlacan / .bash_profile
Created March 21, 2013 05:53
Add Git autocompletion to your OS X command line. You'll need to have installed Git & Hub through Homebrew for this to work.
# Git Autocompletion
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/hub.bash_completion.sh
@olivierlacan
olivierlacan / screenflow_changelog_4-0-0_to_4-0-3.md
Created March 6, 2013 09:01
Screenflow Changelog for versions 4.0.0 through 4.0.3

Version 4.0.3 Fixes and Improvements

  • Fixed WMV not loading correctly in the 32-bit application
  • Fixed VGA out to Monitor not able to record Mirrored mode
  • Fixed mouse image being multiplied when recording Java
  • Fixed location of export menu under specific circumstances
  • Fixed inability to export to Windows Media using the Mac App Store version of ScreenFlow
  • Added missing tooltips
  • Fixed issue when changing font size removed bold and italics
  • Fixed the inability to select the caption track of a nested clip
@olivierlacan
olivierlacan / session_store_deprecation.md
Created February 24, 2013 22:57
This is the deprecation warning thrown by Rails 4 to invite an update of the session_store.rb file

DEPRECATION WARNING: You didn't set config.secret_key_base in config/initializers/secret_token.rb file. This should be used instead of the old deprecated config.secret_token in order to use the new EncryptedCookieStore. To convert safely to the encrypted store (without losing existing cookies and sessions), see http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#action-pack.

@olivierlacan
olivierlacan / 1_poltergeist_flash.rb
Last active December 11, 2015 16:59
Poltergeist has a neat but unintuitive way of returning cookies from `page.driver.cookies` or `Capybara.current_session.driver.cookies`, here's how you get them to play nice with assertions in RSpec integration specs using Capybara for example.
module PoltergeistFlash
module TestHelpers
def flash_cookie
cookie = CGI.unescape Capybara.current_session.driver.cookies["flash"].value
return {} unless cookie
JSON.parse(cookie).with_indifferent_access
rescue JSON::ParserError
{}
end
end
@olivierlacan
olivierlacan / science-based_development.md
Last active October 13, 2015 01:47
Science-based Development

Science-based Development

Summary

Development, like science, is a messy endeavor. It’s near impossible to control all the variables. Testing code is a noble goal, but it’s very easy to test the wrong thing. Many experienced scientists are fooled by their senses and biases. To account for that they crafted and refined a Scientific Method. That method has been stress tested by centuries of experimentation, discovery and peer-review. It probably wouldn’t hurt to try to apply it to development and see what it can offer.

Steps

  1. Inquire
  2. Hypothesize
  3. Disprove
@olivierlacan
olivierlacan / gist:4062929
Last active March 12, 2025 04:27 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@olivierlacan
olivierlacan / article.rb
Created November 2, 2012 06:38
Associations in Rails 4 return a CollectionProxy instead of an Array
class Article < ActiveRecord::Base
has_and_belongs_to_many :tags
end
You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)
If you want to expose your action to GET, use `get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"