Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Schoffelen tschoffelen

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

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
slorber / react-navigation-tree.jsx
Last active Sep 9, 2020
react-navigation-tree.jsx
View 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({
@felipetavares
felipetavares / simple_useful_slow.js
Last active Aug 12, 2019
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
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
// 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
@JoshOrndorff
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
so0k / alpine-curl.md
Created Mar 1, 2018
Alpine curl issues
View alpine-curl.md

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
<?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.
@gka
gka / plot.png
Last active Aug 17, 2020
visualize git logs accross multiple repositories
@davidnormo
davidnormo / npm-global-export-import.md
Last active Mar 31, 2016
npm global export import
View npm-global-export-import.md

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
rauchg / README.md
Last active Sep 29, 2020
require-from-twitter
View README.md
You can’t perform that action at this time.