Skip to content

Instantly share code, notes, and snippets.

View ferdbold's full-sized avatar
🎮
Still in Act 1

Frédéric Bolduc ferdbold

🎮
Still in Act 1
View GitHub Profile
@ferdbold
ferdbold / win7-snipping-tool-hotkey
Created June 7, 2016 19:45
Bind your Print Screen key to Snipping Tool in Windows 7
; Win7 doesn't allow for binding the PrintScrn key to a shortcut. So instead, you can use
; this Autohotkey script to intercept the key and rebind it to another hotkey
; (here Ctrl+Alt+1), that can be set inside the properties of the Snipping tool shortcut.
; Enjoy!
SendMode, Input
PrintScreen::
Send, ^!{1}
return
@ferdbold
ferdbold / localsettings.js
Created October 2, 2015 00:29
Parsoid local settings
/**
* Parsoid web service configuration file.
* This file is managed by Puppet.
*/
exports.setup = function( parsoidConfig ) {
parsoidConfig.setMwApi( {
prefix: 'localhost',
domain: '127.0.0.1',
uri: 'http://127.0.0.1:8080/w/api.php',
} );
@ferdbold
ferdbold / mediane.py
Last active August 29, 2015 14:15
Median value of two same-length sorted lists
# Returns the two median values of two same-length sorted lists
# Algorithm complexity: O(lg n), n being the length of the lists
# Usage: mediane.py [firstlist] [secondlist]
# Input lists as integers separated by spaces (wrap list in quotemarks to input it as one command line argument)
import math, sys
def mediane(X, Y):
n = len(X)
@ferdbold
ferdbold / gist:8534327
Created January 21, 2014 04:10
Simple PHP trace
function trace($toTrace) {
echo '<pre>';
var_dump($toTrace);
echo '</pre>';
}