Skip to content

Instantly share code, notes, and snippets.

View Gmousse's full-sized avatar
🏠
Working from home

Guillaume Mousnier Gmousse

🏠
Working from home
View GitHub Profile
@Gmousse
Gmousse / settings.json
Created November 26, 2018 21:12
Visual Studio Code settings
{
"workbench.editor.enablePreview": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"window.zoomLevel": 0,
"atomKeymap.promptV3Features": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.linting.pylintEnabled": false,
@Gmousse
Gmousse / randomPickRestaurantOnDeliveroo.js
Created September 20, 2018 08:50
Pick a random restaurant on the Deliveroo current page
/**
* Open a random restaurant page from the current deliveroo page.
*/
function pickARestaurant() {
const restaurants = Array.from(document.getElementsByTagName('a')).filter(x => x.children[0] && x.children[0].className.includes("RestaurantCard")).map(x => x.href);
window.open(restaurants[Math.round(Math.random() * restaurants.length)]);
}
@Gmousse
Gmousse / downloadBundle.js
Created August 30, 2018 17:09
Download all humble bundle links
/**
* Download all Humble bundle items of a specific type (eg: EPUB).
* @param {String} innerText The tag of the items to download.
*/
function downloadAllBundleItems(innerText) {
return Array.from(document.getElementsByTagName('a')).filter(x => x.innerText == innerText).forEach(x => window.open(x.href));
}
@Gmousse
Gmousse / .zshrc
Last active October 6, 2019 19:21
A synced .zshrc used to give default config to my environment.
# Copyright (c) 2018 Guillaume Mousnier
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
@Gmousse
Gmousse / install-code.sh
Last active October 3, 2022 15:59
My script to install my Manjaro laptop
#! /bin/bash
# Copyright (c) 2018 Guillaume Mousnier
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
@Gmousse
Gmousse / README.md
Last active June 9, 2019 14:09
Simple JS functions benchmark

Simple Benchmark

A simple benchmark library to benchmark js functions without installing 1go of depedencies.

Requirements

Nodejs: 6.x.x, 7.x.x, 8.x.x, 9.x.x

Installation

@Gmousse
Gmousse / d3-tree-compute.js
Created April 18, 2017 13:49
D3.js natural tree generator
/*
The MIT License (MIT)
Copyright (c) 2017 Guillaume Mousnier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@Gmousse
Gmousse / percolate.js
Last active February 16, 2017 22:17
percolate, a function to filter callbacks by delay
/*
The MIT License (MIT)
Copyright (c) 2016 Guillaume Mousnier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Gmousse
Gmousse / album.jsx
Last active April 18, 2017 13:34
Mobx Application Example
/*
The MIT License (MIT)
Copyright (c) 2016 Guillaume Mousnier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell