Skip to content

Instantly share code, notes, and snippets.

Peter Uithoven peteruithoven

Block or report user

Report or block peteruithoven

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@peteruithoven
peteruithoven / quarter-tiler
Last active Sep 14, 2019
Crude quarter tiling tool for elementary OS
View quarter-tiler
#!/bin/bash
# Crude quarter tiling tool
# Installation:
# Move file to: /usr/local/bin/quarter-tiler
# Make executable: sudo chmod +x /usr/local/bin/quarter-tiler
# Assign keyboard shortcuts to commands like "quarter-tiler topleft"
# Margins around windows (elementary OS native apps) (HiDPI)
MARGIN_TOP=130
@peteruithoven
peteruithoven / installed-info.sh
Last active Oct 30, 2018
List info on installed applications (Read only)
View installed-info.sh
#!/bin/bash
# Download and run:
# curl -o- [raw gist url] | bash
function list_installed () {
comm -23 \
<(apt-mark showmanual | sort -u) \
<(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
}
View rafUpdateBatcher.js
/*
* Utility to only call Redux updates in RequestAnimationFrame's
* Also uses React-dom's batchedUpdates
*/
import raf from 'raf';
import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
let rafID;
let notifyFunc;
function animFrame() {
@peteruithoven
peteruithoven / updateDBs.js
Created May 12, 2017
Superlogin util to update databases according to configuration
View updateDBs.js
const SuperLogin = require('superlogin');
const superloginConfig = require('../superlogin.config.js');
const DBAuth = require('superlogin/lib/dbauth');
const superlogin = new SuperLogin(superloginConfig);
const { config, userDB } = superlogin;
const dbAuth = new DBAuth(config);
if (!config.getItem('userDBs.defaultDBs')) {
console.log('no userDBs.defaultDBs defined');
View gifenc
#!/bin/bash
# Usage examples:
#
# Create sd.mp4.gif
# $ gifenc sd.mp4
#
# Create sd.gif
# $ gifenc sd.mp4 sd.gif
#
View Carot-sign
'{"data":[{"height":20,"transform":{"metadata":{"library":"CAL","type":"Matrix"},"matrix":[2.532535102433726,0,-15.363289865521766,0,2.532535102433726,30.37459874467367]},"z":0,"sculpt":[1,1,1],"twist":0,"points":[{"metadata":{"library":"CAL","type":"Vector"},"x":-27.51850563144776,"y":7.269115192200452},{"metadata":{"library":"CAL","type":"Vector"},"x":-27.51850563144776,"y":7.269115192200452},{"metadata":{"library":"CAL","type":"Vector"},"x":-27.51850563144776,"y":7.269115192200452}],"type":"FREE_HAND"},{"height":20,"transform":{"metadata":{"library":"CAL","type":"Matrix"},"matrix":[2.532535102433726,0,-15.363289865521766,0,2.532535102433726,30.37459874467367]},"z":0,"sculpt":[1,1,1],"twist":0,"points":[{"metadata":{"library":"CAL","type":"Vector"},"x":-18.90636751164164,"y":3.8242599442779905}],"type":"FREE_HAND"},{"height":20,"transform":{"metadata":{"library":"CAL","type":"Matrix"},"matrix":[2.532535102433726,0,-15.363289865521766,0,2.532535102433726,30.37459874467367]},"z":0,"sculpt":[1,1,1],"twist":0,"
You can’t perform that action at this time.