Skip to content

Instantly share code, notes, and snippets.

@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@Bahanix
Bahanix / post-checkout
Created June 4, 2018 11:14
post-checkout hook to display if you had stashed something on this branch
#!/bin/sh
STASH_NAME="$(git stash list | grep `git branch | grep \* | cut -d ' ' -f2` | head -n1 | cut -d':' -f1)"
if [ -n "$STASH_NAME" ]
then
echo "Last stash on this branch:"
git --no-pager stash show "$STASH_NAME" -p
echo "To keep your stash list clean, consider using one of the followings:"
echo "git stash pop \"$STASH_NAME\""
echo "git stash drop \"$STASH_NAME\""
@marcgg
marcgg / notevalues.json
Created November 1, 2016 10:56
note frequency value
var noteValues = {
'C0': 16.35,
'C#0': 17.32,
'Db0': 17.32,
'D0': 18.35,
'D#0': 19.45,
'Eb0': 19.45,
'E0': 20.60,
'F0': 21.83,
'F#0': 23.12,

Ces informations sont issues du document "Rédaction des offres d’emploi : le cadre juridique, Guide pratique pour la rédaction des offres d’emploi", 2010, Pôle emploi

La mention discriminatoire liée au sexe

La discrimination fondée sur le sexe est prohibée de façon explicite par trois articles :

  • article 225-1 du Code pénal
  • articles L 1132-1 et L 1142-1 du Code du travail
@paulfitz
paulfitz / hstruct.rb
Created April 10, 2014 04:10
OpenStruct, modified to be interchangeable with regular instances
# OpenStruct, modified to be interchangeable with regular instances
# in a haxe translation
#
# The one difference with OpenStruct is that any lambda will get
# automatically called, as if it were a regular method:
# thing = HxOpenStruct.new
# thing.add_one = lambda{|x| x+1}
# thing.forty = 40
# thing.forty_two = lambda{ 42 }
@ssaunier
ssaunier / git-pre-push-hook-install.sh
Last active June 9, 2018 02:51
Hook to rub rspec and karma before each `git push`. Can be bypassed with `git push --no-verify`
cd /path/to/your/repo
curl https://gist.github.com/ssaunier/8704755/raw/pre-push.sh > .git/hooks/pre-push
chmod u+x .git/hooks/pre-push
@sononum
sononum / gist:6183139
Created August 8, 2013 09:26
accelerate Kaminari with Postgres insert into config/initializers/kaminari.rb
module Kaminari
module PageScopeMethods
def total_count
@_hacked_total_count || (@_hacked_total_count = self.connection.execute("SELECT (reltuples)::integer FROM pg_class r WHERE relkind = 'r' AND relname ='#{table_name}'").first["reltuples"].to_i)
end
end
end