Skip to content

Instantly share code, notes, and snippets.

View g2p's full-sized avatar
🪓
Hacking

Gabriel de Perthuis g2p

🪓
Hacking
View GitHub Profile
@g2p
g2p / export-shazam-web.js
Last active January 21, 2023 14:41 — forked from hennzen/export-shazam-web.js
Export Shazam list to JSON format
// JS-Console script to export song name, artist and cover image URL to a JSON format
// Order of results is in ascending date order. If you want to change that, delete line with '.reverse()'
// The result is copied to your clipboard
//
// 1. Open https://www.shazam.com/myshazam and login
// 2. Scroll down to the end of your list, so that *all* songs are loaded
// 3. Open Developer console with F12
// 4. Copy paste this code to the JS-console and hit Enter
// 5. Paste the result to your favorite text editor. Voilà.
@g2p
g2p / myocamlbuild.ml
Created October 19, 2016 10:44
qtest extract ocamlbuild integration
open Ocamlbuild_plugin;;
rule "qtest extract"
~prod:"%_tests.ml"
~deps:["%.ml"]
(fun env build ->
Cmd(S[A"qtest"; A"extract"; A"-o"; P(env "%_tests.ml"); P(env "%.ml")]))
@g2p
g2p / layouts.py
Last active January 4, 2016 08:49
Detect keyboard layouts (azerty, qwertz, others) using SDL2
#clone https://bitbucket.org/marcusva/py-sdl2
"""
Distinguish azerty/qwerty/qwertz
After experimenting, must SDL_INIT_VIDEO and use
SDL_GetKeyFromScancode or SDL_GetScancodeFromKey
The mapping is cached by SDL2;
enable the event loop or use SDL_Quit to detect again.
@g2p
g2p / pip.1
Created December 23, 2011 08:51
pip manpage
'\" t
.\" Title: pip
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
.\" Date: 11/30/2009
.\" Manual:
.\" Source:
.\" Language: English
.\"
.TH "PIP" "1" "11/30/2009" "" ""