Skip to content

Instantly share code, notes, and snippets.


Thomas Schoffelen tschoffelen

  • London
View GitHub Profile
DavidWells /
Created Feb 15, 2020
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."

slorber / react-navigation-tree.jsx
Last active Jan 6, 2021
View react-navigation-tree.jsx
const App = createAppContainer(
LoggedSwitch: createSwitch({
// When user is authenticated
LoggedIn: createStack({
// The logged in root is generally a tab or drawer navigator
LoggedInRoot: createTabsOrDrawer({
felipetavares / simple_useful_slow.js
Last active Dec 15, 2020
Simple, Useful and Slow: Assorted Reference Statistics Functions (utf-8)
View simple_useful_slow.js
// Simple, Useful and Slow
// Assorted Reference Statistics Functions
// UTF-8 Edition
// Shorthands
pow = Math.pow
sqrt = Math.sqrt
pi = Math.PI
mndrix / sms.go
Last active Jun 23, 2020
SMS over IRC
View sms.go
// A proxy for sending/receiving SMS via IRC
// This code is part of our family IRC server whose code is available at
// 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
JoshOrndorff / pi.k
Last active Jun 5, 2018
My work-in-progress pi-calculus in k framework
View pi.k
module PI-SYNTAX
imports DOMAINS
// Processes
syntax Proc ::= Norm // Normal processes are still processes
| Proc "|" Proc // Parallel
| "!" Proc // Replication
| "(" "v" Id ")" Proc // New name
| "(" Proc ")" // Allow parens for grouping
so0k /
Created Mar 1, 2018
Alpine curl issues

To fix /usr/bin/curl: curl_mime_type: symbol not found Errors when trying to run curl in a running alpine pod.

Right solution: Update base alpine image because this is a bigger issue

Quick fix: run Alpine system upgrade (or upgrade libcurl package specifically):

apk update
apk upgrade
View cognito-decode-jwt-token.php
* Assumes library is installed and autoloading is set up
* Decode and verify token guide:
use Jose\Factory\JWKFactory;
use Jose\Loader;
// We load the key set from a URL
// JSON Key URL (JKU) - https://cognito-idp.{region}{userPoolId}/.well-known/jwks.json.
gka / plot.png
Last active Jan 27, 2021
visualize git logs accross multiple repositories
davidnormo /
Last active Mar 31, 2016
npm global export import

The following command will give you a string of all the npm packages and their versions that are currenctly globally installed.
Note: that this ignores packages installed from directories and picks only those installed via the npm registry.

$ npm ls -g --depth 0 | sed -e '1d' -e 's/└── //g' -e 's/├── //g' -e '/^.*->.*$/d' -e '/^$/d' | tr '\n' ' '

If you copy this string, you can then append it to the end of npm install -g to install all of the packages.

rauchg /
Last active Feb 19, 2021