Skip to content

Instantly share code, notes, and snippets.

View squio's full-sized avatar

Johannes la Poutre squio

View GitHub Profile

Keybase proof

I hereby claim:

  • I am squio on github.
  • I am jlapoutre (https://keybase.io/jlapoutre) on keybase.
  • I have a public key whose fingerprint is BEDE 253C 6A05 4DEF B3BC 9F76 8D94 C0A6 D0BA 1342

To claim this, I am signing this object:

Verifying that +jlapoutre is my openname (Bitcoin username). https://onename.com/jlapoutre
@squio
squio / Triodos_afschriften_downloader.user.js
Created April 18, 2015 09:04
Greasmonkey script (Firefox) - download de laatste N afschriften van Triodos.nl
// ==UserScript==
// @name Triodos afschriften downloader
// @namespace http://squio.nl/triodos
// @include https://bankieren.triodos.nl/ib-seam/pages/accountinformation/statement/statementoverview.seam
// @version 1
// @grant none
// ==/UserScript==
// NEVER execute any code into a banking site if you're not absolutely certain it is safe!!!
// Make sure you fully UNDERSTAND what this is doing before proceeding.
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@squio
squio / list-ipa-udid.sh
Last active February 19, 2016 08:32 — forked from possan/list-ipa-udid.sh
Simple script to list the allowed UDID's inside an apple IPA package, to verify it's going to work on a specific users device.
#!/bin/sh
#
# Simple script to print out UDID's in apple IPA packaged apps.
#
# Syntax: list-ipa-udid.sh {my-application.ipa}
#
IPA=$1
@squio
squio / MongoId.php
Last active August 1, 2016 07:26
Yii2 Legacy MongoRegex, MongoId implementation for backward compatibility with php < 7.0
<?php
use MongoDB\BSON\ObjectID;
/**
* Legacy MongoId implementation for backward compatibility with php < 7.0
* Usage: add this to entry script
* if (version_compare(phpversion(), '7.0.0', '>')) {
* // php v7 uses different MongoDB classes
* Yii::$classMap['MongoId'] = '@app/components/MongoId.php';
* }
@squio
squio / yii2-user-rbac.txt
Created June 16, 2017 12:59
Add User Management permission for Dektrium yii2-user for use with yii2-rbac
Add permission to config
'modules' => [
'user' => [
'class' => 'dektrium\user\Module',
'adminPermission' => 'user_admin', // RBAC permission for administration
...
Add RBAC auth_item
name: 'user_admin'
type: 2
/* vim: ts=2 noet ai :
$Id: exifthumbnailfetcher.user.js $
LICENSE
=======
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@squio
squio / BTSend2Nokia.applescript
Created July 11, 2017 06:29
Send VCARDs one by one from OS X to legacy Nokia s40
property device : "Nokia 515"
tell application "Finder" to set myPath to selection
on sendFile(f)
-- tell application "Finder" to set fileAlias to selection as alias
set fileAlias to f as alias
set fileToSend to fileAlias
tell application "Finder" to open fileToSend using application file id "com.apple.BluetoothFileExchange"
activate application "Bluetooth File Exchange"
tell application "System Events"
@squio
squio / lastexport.py
Last active September 25, 2017 10:58 — forked from bitmorse/lastexport.py
lastfm scrobble exporter (from https://gitorious.org/fmthings/lasttolibre/blobs/master/lastexport.py // changed the script to try more often on failure )
#!/usr/bin/env python
#-*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of