I hereby claim:
- I am stojg on github.
- I am stojg (https://keybase.io/stojg) on keybase.
- I have a public key ASB_XpPl1n_gZ9b6be0KAUwCV7CHuGWXj0UFJGnJhESWjQo
To claim this, I am signing this object:
function HowManyIsEnough(n: number) : number { | |
return n + 1 | |
} |
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/> | |
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt> | |
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1` | |
acrobat | |
africa | |
alaska | |
albert | |
albino | |
album | |
alcohol |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// This golang program is a remix/parody of https://gist.github.com/mrmorphic/7cb86c7b1a5e3da9d8664d6e8a1e3518 | |
// that notifies the user that notifies a user after a slow process have finished, but instead of using the computers | |
// speech synthesiser or notification system, sends you a text instead. This means that you can leave the safe confines | |
// of your desk while scavenging office supplies, stalk colleagues or have a quiet smoko. I.e. it's the 2020 version of | |
// https://xkcd.com/303/. Ideal for those dependency fetching / compiling steps. | |
// | |
// To make this work you need to at least setup a `https://www.twilio.com` trial account and define a couple ENV | |
// variables: | |
// | |
// # Get this from your twilio account |
<?php | |
// could be abstract class? | |
interface FeatureInterface { | |
function isSupported(); | |
} | |
interface LetmeinInterface extends FeatureInterface { | |
function letmein($username, $password); | |
} |
#!/bin/bash | |
options=('find' 'delete') | |
PS3='state your wish: ' | |
echo -e "\nfind/delete corrupt whisper-files" | |
select opt in "${options[@]}"; do | |
case $REPLY in | |
[12] ) option=$opt; break;; | |
* ) exit;; |
// these are generic functions that return boolean depending of the state in data | |
// they are used by state transitions to progress the state machine | |
const hasStarted = (data) => data.started === true; | |
const isEmployee = (data) => data.employee === true; | |
const isPersonal = (data) => data.personal === true; | |
// this is where we set up the full statemachine and connect 'from' states (e.g "initState") and where | |
// they can transition to (e.g. "setTypeState") and what would trigger that transition | |
const transitions = { | |
// initial state |
package main | |
import ( | |
"fmt" | |
"io" | |
"math/rand" | |
"os" | |
"path" | |
"path/filepath" | |
"sort" |