Skip to content

Instantly share code, notes, and snippets.

View tschoffelen's full-sized avatar

Thomas Schoffelen tschoffelen

View GitHub Profile
@DavidWells
DavidWells / user-feedback.md
Created February 15, 2020 22:47
Don Norman quote from The Invisible Computer

Don Norman quote from The Invisible Computer:

"Don’t ask people what they want. Watch them and figure out their needs. If you ask, people usually focus on what they have and ask for it to be better: cheaper, faster, smaller. A good observer might discover that the task is unnecessary, that it is possible to restructure things or provide a new technology that eliminates the painstaking parts of their procedures. If you just follow what people ask for, you could end up making their lives even more complicated."

@mndrix
mndrix / sms.go
Last active June 23, 2020 17:20
SMS over IRC
// A proxy for sending/receiving SMS via IRC
//
// This code is part of our family IRC server whose code is available at
// https://gist.github.com/mndrix/7947009178e4a18c247b4bd25821661f
//
// This file won't compile by itself because it's only one file from
// my larger family server (movie hosting, Asterisk dialplan, Git
// hosting, personal assistant, etc).
//
// Copyright 2018 Michael Hendricks
@mdornseif
mdornseif / mt940toOFX.py
Last active July 14, 2020 13:42
Convert SWIFT MT940 data to OFX.
#!/usr/bin/env python
# encoding: utf-8
"""
mt940toOFX.py - Dieses Progrtamm liesst MT940 SWIFT Kontostände und konvertiert sie in OFX.
OFX wurde mit xero.com getestet.
Created by Maximillian Dornseif on 2010-06-05.
Copyright (c) 2010, 2013, 2014 HUDORA. All rights reserved.
"""
<?php
/**
* Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up
* Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md
*/
use Jose\Factory\JWKFactory;
use Jose\Loader;
// We load the key set from a URL
// JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json.
@felipetavares
felipetavares / simple_useful_slow.js
Last active December 15, 2020 12:39
Simple, Useful and Slow: Assorted Reference Statistics Functions (utf-8)
// Simple, Useful and Slow
// Assorted Reference Statistics Functions
// UTF-8 Edition
// Shorthands
pow = Math.pow
sqrt = Math.sqrt
pi = Math.PI
@j-fischer
j-fischer / incomingCalls.js
Last active October 28, 2021 02:49
Twilio functions to forward phone calls to multiple cell phones. See https://cloudthingsyyc.wordpress.com/2018/01/15/hpaas-home-phone-as-a-service/ for more details.
const format = require('string-format');
// These are the numbers to forward the call to
const destinations = ['+1', '+1'];
// These are the numbers that will be forwarded to the cell phones
const allowedCallers = [
'+1', //
];
@nivv
nivv / PHP 7 - Installing imagick on Ubuntu 14.04.md
Last active November 28, 2021 11:38
Guide - Enable imagick on PHP7

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@keighl
keighl / foooont.sh
Last active December 9, 2021 14:00
Rename a font to have the same Family/Fullname/Postscript name. This prevents IE from choking in @font-face
# FontForge command
fontforge -script 2ttf.pe ProprietaryFontCondensedBold.otf
# 2ttf.pe
# FontForge Script
# http://fontforge.org/scripting.html
#
# * Opens the font file
# * Sets the family/fullname/postscript name be the same as the filename (without ext)
@slorber
slorber / react-navigation-tree.jsx
Last active August 13, 2022 19:17
react-navigation-tree.jsx
const App = createAppContainer(
createStack({
LoggedSwitch: createSwitch({
// When user is authenticated
LoggedIn: createStack({
// The logged in root is generally a tab or drawer navigator
LoggedInRoot: createTabsOrDrawer({
@jmadden
jmadden / forward_to_first_number.xml
Last active September 1, 2022 22:28
TwiML Incoming Calls - Forward call to numbers in order. Fire off VMail and send SMS on no answer
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<!-- Forward to first number and if no answer, action URL points to second number to try -->
<Dial timeout="15" action="forward_to_second_number.xml">
<Number url="whisper_instructions.xml">+15554441212</Number>
</Dial>
</Response>