Skip to content

Instantly share code, notes, and snippets.

View gasp's full-sized avatar
🔧
hacking stuff

Gaspard Beernaert gasp

🔧
hacking stuff
View GitHub Profile
@gasp
gasp / handler.test.js
Last active July 9, 2018 09:46
call async function on each array items
const test = require('ava')
// testing the logic
const event = {
Records: [
{
Sns: {
a: 1,
b: 2,
@gasp
gasp / france_departments.json
Last active January 19, 2019 10:16 — forked from pawndev/france_departments.json
Just a JSON that contains bounding box geocode for all france department
{
"franceDepartments": {
"01": {
"name": "Ain",
"bounds": {
"n": "46.519953",
"e": "6.170198",
"s": "45.611093",
"w": "4.728067"
}
@gasp
gasp / djb2.go
Created January 20, 2019 14:02 — forked from lmas/djb2.go
djb2, a non-cryptographic hash function
package djb2
// For when you ever need to implement a dictionary hash function,
// that's good enough, simple and fast.
//
// WARNING:
// Not cryptographicly secure!
//
// Source: https://en.wikipedia.org/wiki/DJB2
//
if [ "$1" == "stash" -a "$2" == "poop" ]
then
command git stash pop
echo "
) )
( ) (
) _ )
( \_
_(_\ \)__
(____\___))"
" Show hidden characters and use Atom style.
set list
set listchars=tab:»\ ,eol:¬,space:.

On my azerty keyboard, there is the § sign that I nearly never use. I like to use the × sign a lot

create a DefaultKeyBinding file

mkdir ~/Library/KeyBinding
vim DefaultKeyBinding.dict