Skip to content

Instantly share code, notes, and snippets.

View cveneziani's full-sized avatar

Cecile Veneziani cveneziani

View GitHub Profile
@mehowte
mehowte / gist:08f7e842b393efd583a1
Created March 4, 2015 13:16
Why I'm speaking at Wroc_love.rb despite their lack of Code of Conduct
I'm a speaker at [Wroc_love.rb](http://www.wrocloverb.com/).
 
Personally I would prefer the place to be more inclusive But I won't
support bullying the organizers into making decisions against their will.
 
Making the conference (especially virtually non-profit one like
wroc_love.rb) is a huge amount of work And I know that because I've been
selecting diverse set of speakers for two Railsberry conferences before it
was even cool.
 
@mkonikowski
mkonikowski / gist:2311838
Created April 5, 2012 15:08
global .gitconfig
[user]
name = Your Name
email = your@email
[push]
default = current
[color]
diff = auto
status = auto
branch = auto
interactive = auto
@paneq
paneq / bench.rb
Last active December 11, 2016 13:00
cost of using exceptions for control flow compared to one SQL statement (ruby 2.1.4, rails 4.1.7, sqlite) for rails-refactoring.com . Development mode executed in rails console.
require 'benchmark'
ActiveRecord::Base.logger = nil
Benchmark.bmbm do |bench|
bench.report("SQL query") do
1000.times { Whatever.count }
end
bench.report("exception hit") do

Contract Killer

Le contrat open-source à destination des designers et développeurs Web par Stuff & Nonsense


@bhays
bhays / Typeahead-BS3-css
Created August 2, 2013 13:54
Bootstrap 3 style fixes for using Typeahead.js
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
font-size: 14px;
@ssaunier
ssaunier / README.md
Last active December 17, 2019 12:45
Use ES6 in your Rails Asset Pipeline

Rails 5.1 introduces a new way of coding JavaScript. You would use yarn, webpack and a new folder, app/javascript.

Setup

If you want to stick with the "old" way (before 5.1) and use the asset pipeline, you need to do this:

# Gemfile

gem 'sprockets', '>= 3.0.0'
@juliends
juliends / turbolinks.md
Created February 19, 2020 13:16
Turbolinks notes
@dadoonet
dadoonet / backup.sh
Created December 26, 2012 14:50
Backup Elasticsearch node
# Script to be placed in elasticsearch/bin
# Launch it from elasticsearch dir
# bin/backup indexname
# We suppose that data are under elasticsearch/data
# It will create a backup file under elasticsearch/backup
if [ -z "$1" ]; then
INDEX_NAME="dummy"
else
INDEX_NAME=$1
@simonc
simonc / .gitconfig
Last active July 9, 2020 23:41
My git configuration
[advice]
# Hides command hints in basic `git status`.
statusHints = false
# Hides any warning when checking out a commit by hash instead of branch.
detachedHead = false
[alias]
# Shows the commit hash on 6 chars to match `git log`.
# -s suppresses the author name and timestamp from the output.
blame = blame --abbrev=6 -s
@pcreux
pcreux / README.md
Last active October 10, 2020 18:44
Failsafe: degrade user experience and notify when something goes wrong.

Failsafe

When something goes wrong I want to degrade the user experience (instead of returning a 500 - Server Error) And I want to be notified about the failure

Usage

Wrap non mission critical code: