Skip to content

Instantly share code, notes, and snippets.

@MattiSG
MattiSG / README.md
Last active July 28, 2022 06:49 — forked from skyggeovn/README.md
Convert a wiki from MediaWiki to Gollum and Markdown, importing all metadata.

This will convert a wiki from MediaWiki to Gollum and Markdown (or any other format supported by Pandoc).

  1. Install dependencies:

    brew install pandoc icu4c
    gem install --no-ri --no-rdoc hpricot gollum gollum-lib pandoc-ruby
  2. Perform a Special:Export

@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 / upgrade-watai-06-07.js
Last active November 7, 2015 17:40
Upgrade Watai test suites from v0.6 to v0.7
#!/usr/bin/env node
// Partially upgrades a Watai test suite from v0.6 to v0.7 syntax.
// Usage: node upgrade-watai-06-07.js path/to/test/suite/folder [another/test/suite [another/suite …]]
// Only renames files.
var fs = require('fs');
process.argv.splice(0, 2);
@MattiSG
MattiSG / 1 - ValidatedScenario.js
Last active November 3, 2015 08:59
Selenium issue reproduction case
description: 'Invalid fields should be clearable',
steps: [
InputComponent.setValidatedField('2'),
{ 'InputComponent.validatedField': '2' },
InputComponent.setValidatedField('e'),
{ 'InputComponent.validatedField': 'e' },
InputComponent.setValidatedField('3'),
{ 'InputComponent.validatedField': '3' }, // fails: `e` was invalid, the field is not cleared and contains `e3`
]
@MattiSG
MattiSG / keybase.md
Created April 18, 2015 15:28
keybase.md

Keybase proof

I hereby claim:

  • I am mattisg on github.
  • I am mattisg (https://keybase.io/mattisg) on keybase.
  • I have a public key whose fingerprint is 4153 9680 D622 BF41 8CFE 53AD D175 0153 BF1B E9D0

To claim this, I am signing this object:

@MattiSG
MattiSG / gist:91cc73e0f8cf76ddf094
Created January 9, 2015 14:22
OpenFisca failure stack trace
14:57:59,557 ERROR [openfisca_core.formulas] An error occurred while calling formula individus@reintegration_titre_restaurant_employeur<2015-02> in openfisca_france.model.cotisations_sociales.remuneration_prive.reintegration_titre_restaurant_employeur
14:57:59,558 ERROR [openfisca_core.formulas] An error occurred while calling formula individus@salbrut<2015-02> in openfisca_france.model.cotisations_sociales.remuneration_prive.salbrut
14:57:59,558 ERROR [openfisca_core.formulas] An error occurred while calling formula individus@ratio_smic_salaire<2015> in openfisca_france.model.cotisations_sociales.allegements.function_2012
14:57:59,558 ERROR [openfisca_core.formulas] An error occurred while calling formula individus@allegement_fillon_annuel<2015> in openfisca_france.model.cotisations_sociales.allegements.allegement_fillon_annuel
14:57:59,558 ERROR [openfisca_core.formulas] An error occurred while calling formula individus@allegement_fillon<2015-01> in openfisca_france.model.cotisations_sociales.allegements.al
@MattiSG
MattiSG / Count unread mails.js
Created November 21, 2014 09:52
Userscripts for Outlook webmail
/** If you use Fluid.app, this is a drop-in.
* The variable storing the count of unread mails is window.fluid.dockBadge, change it as needed for your use case.
*/
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 1000);
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 5000);
function updateDockBadge() {
@MattiSG
MattiSG / index.md
Created October 14, 2014 19:57
Humble Mozilla Bundle

I'll try to elaborate a bit more on https://twitter.com/matti_sg/status/522103990373588992 and explain why the Humble Mozilla Bundle is such a noticeable event.

Let's recap what's happening: a non-profit (Mozilla) partners with an indie promotion platform (HumbleBundle) to promote its free open-source tech (asm.js and Firefox). It uses all its communication power for this (social accounts but, more importantly, the Firefox start page that morphs into a game itself). Private, independent actors (the game creators and HumbleBundle) benefit from this, the non-profit does too (portions of the bundle price go back to Mozilla), and most of all the union of such big actors proves the platform can deliver the promise.

Mozilla had done several demos of HTML5 + WebGL + asm.js being a proper platform for

@MattiSG
MattiSG / Tutorial.md
Last active August 29, 2015 14:03
Watai v0.6.2 tutorial

Watai tutorial: the DuckDuckGo example

Subject

We’ll present a test for the DuckDuckGo search engine. This engine is just like Google, except that it doesn’t track you, and that it has a nice disambiguation feature: the “Zero Click Info box”.

Let’s imagine we are engineers at DuckDuckGo, and we want to test if a Zero Click Info box is shown for an acronym: “TTIP”.

@MattiSG
MattiSG / notes.md
Created June 25, 2014 17:49
Faire science avec l'incertitude — notes de séminaire

Positivisme et Constructivisme

Les objets d'étude des SHS et leur connaissance est incertaine. La connaissance des objets physiques peut être incertaine, mais celle des objets sociaux l'est d'autant plus que ces derniers sont des constructions sociales. Double constructions ontologique car l'interprétation dépend à la fois des catégories du chercheur et de

Systèmes complexes : métathéorie. Individus, sociétés, cultures sont des systèmes complexes. Approche qui focalise sur les interactions, imbrication des niveaux, phénomènes émergents, imprédictibilité… changement car réductionnisme impossible.

Deux sources de complexité en SHS :

  • Grand nombre d’éléments et interactions, même si les interactions sont simples.
  • Complexité des interactions, caractéristique en SHS : comportements, stratégies, intentionnalité…