Skip to content

Instantly share code, notes, and snippets.

@MattiSG
MattiSG / ressource-types.js
Created April 24, 2017 10:54
Evaluate valid OpenFisca names from a list
var ressourceTypes = [
'aah',
'aeeh',
'af',
'aide_logement',
'allocationsChomage',
'allocationSecurisationPro',
'asf',
'asi',
'aspa',
@MattiSG
MattiSG / README.md
Last active November 3, 2016 16:07
How to get thumbnails on webpages

How to get thumbnails on pages

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MattiSG
MattiSG / map.geojson
Last active November 3, 2016 15:08
All Internet Exchange Points listed on Wikipedia, mapped. Used in the State Surveillance map: http://mattischneider.fr/h4yr/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MattiSG
MattiSG / README.md
Last active February 5, 2016 15:47
ChromeDriver issue reproduction

With a running ChromeDriver:

git clone https://gist.github.com/4805526b5dcea0897c27.git
npm install selenium-webdriver
node index.js
@MattiSG
MattiSG / localize_helper.rb
Created October 14, 2013 12:02
Add number localization to Rails' `i18n` module.
module LocalizeHelper
# Wraps I18n.localize to add support for Numbers l12n.
#
# @param value [Numeric|DateTime|Time|Date] The value to localize.
# @return [String] The localized value.
# @see <https://github.com/svenfuchs/i18n/issues/135>
def localize(value)
if value.is_a?(Numeric)
number_with_delimiter(value, locale: I18n.locale)
<html>
<head>
<title>Async demo</title>
<style>
body {
width: 100%;
min-height: 8em;
border: 1px solid red;
}
</style>
@MattiSG
MattiSG / upgrade-watai-05-06.sh
Last active December 22, 2015 10:59
Upgrade Watai from 0.5 to 0.6 syntax
#!/bin/bash
# Partially upgrades Watai tests from v0.5 syntax to v0.6
# Removes enclosing curly braces from Feature and Widget files
IFS=$(echo -en "\n\b")
for file in $(find -E "$1" -regex ".*(Feature|Widget)\.js$" -type f)
do
mv "$file" "$file~"
grep -v '^[{}]$' "$file~" | sed 's:^ ::g' > "$file"
@MattiSG
MattiSG / popAndBounce.css
Created February 13, 2013 14:13
[animate.css](http://daneden.me/animate/) extension: `popAndBounce`. This one is intended to be repeated.
@-webkit-keyframes popAndBounce {
0%, 40% {
-webkit-transform: scale(1);
}
5% {
-webkit-transform: scale(0.9);
opacity: 0.7;
}
10%, 15%, 28%, 35% {
-webkit-transform: scale(1.2) translateX(0);
@MattiSG
MattiSG / Résumé Dani.md
Last active December 11, 2015 05:18
Résumé du “Projet d’accord national interprofessionnel sur la sécurisation de l’emploi” tel que validé en janvier 2013.

Accords Dani

Source

  • mise en œuvre au plus tard au 1er janvier 2016
  • complémentaire santé remboursant 100% de la base sécu des actions courantes, 125% du dentaire et 100€ forfaitaire / an pour l'optique, financée à 50% employeur / 50% salarié
  • report des droits au chômage d'une période d'emploi sur l'autre
  • hausse des cotisations patronales à l'assurance chômage sur les contrats courts : 7% pour < 1 mois, 5,5% pour 1 mois < 3 mois (base actuelle : 4%)
  • exonération des cotisations patronales à l'assurance chômage pendant 3 mois pour l'embauche d'un jeune < 26 ans