Skip to content

Instantly share code, notes, and snippets.

View miclf's full-sized avatar

Michaël miclf

View GitHub Profile
@miclf
miclf / macos_keyboard_shortcuts_exporter_importer.php
Last active January 25, 2024 07:01
A small tool to automatically export and import custom macOS keyboard shortcuts.
#!/usr/bin/env php
<?php
// Determine which command has been called.
$cmd = (!empty($argv[1])) ? strtolower($argv[1]) : null;
// If an invalid number of arguments has been passed (or if no argument
// was given at all), display help information.
if ($argc < 2 || $argc > 3 || !in_array($cmd, ['save', 'load'])) {
@miclf
miclf / bookmarklet.js
Last active August 29, 2015 14:02
Make the Belgian official journal less unreadable
javascript:(function(){document.body.style.background='#fff';var%20table=document.querySelectorAll('table');if(!table||table.length<4)return;with(table[3].style){maxWidth='50em';marginLeft=marginRight='auto';border='1px%20solid%20#999';}var%20th=table[3].querySelector('tr:nth-child(2)%20th');with(th.style){padding='2em';border='0';backgroundColor='#fff';fontFamily='Lucida%20Grande,%20Lucida%20Sans,%20Lucida%20Sans%20Unicode,%20sans-serif';fontWeight='normal';lineHeight='1.4';}})();