I hereby claim:
- I am enriched on github.
- I am enriched (https://keybase.io/enriched) on keybase.
- I have a public key whose fingerprint is 4647 E8D8 7A94 3EE9 14D1 3A29 C0F0 DA43 480F 6E04
To claim this, I am signing this object:
usefulbashping() | |
{ | |
read loss rttavg <<< $(ping -q -c 100 -w 60 -A $1 | \ | |
awk 'BEGIN {FS="[/ ]"}; /loss/ {print substr($6,0,length($6))}; /rtt/ {print $9*1000}') | |
} |
_list_from_file() | |
{ | |
local curr_arg; | |
curr_arg=${COMP_WORDS[COMP_CWORD]} | |
filelines=$(cat /some/file) | |
COMPREPLY=( $(compgen -W "$filelines" -- $curr_arg) ); | |
} |
ngreplocalport(){ | |
sudo ngrep -q -W byline -d lo0 '' "port $1"; | |
} |
# you can add this little gem to your .bash_profile to run a command inside of each directory in the current folder | |
# eg: foreachdir 'git status' | |
foreachdir() { /usr/bin/find . -type d -mindepth 1 -maxdepth 1 -exec sh -c "(cd {} && echo '\033[0;31m// '\$PWD'------>\033[0m' && $1)" ';' ; } |
#!/bin/bash | |
# Uses awk to do the comparison so it can handle floating point numbers | |
awke() | |
{ | |
echo "$1 $3" | awk '{ print ($1 '"$2"' $2) }' | |
} | |
awke '3.124' '*' '6' |
/** | |
* MIT License | |
* | |
* Copyright (c) 2016 Richard Adams (https://github.com/enriched) | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
var durable: DurableStatic = require('durable'); | |
export {durable}; | |
export interface DurableStatic { | |
state: <M extends EventBase, S extends StateBase>(name: string) => State<M, S>; | |
statechart: <M extends EventBase, S extends StateBase>(name: string) => Statechart<M, S>; | |
stage: <M extends EventBase, S extends StateBase>(name: string) => Stage<M, S>; | |
flowchart: <M extends EventBase, S extends StateBase>(name: string) => Flowchart<M, S>; | |
ruleset: <M extends EventBase, S extends StateBase>(name: string) => Ruleset<M, S>; |
I hereby claim:
To claim this, I am signing this object:
run-in-folder () | |
{ | |
CUR_PWD=$PWD; | |
cd $1; | |
eval "${@:2}"; | |
cd $CUR_PWD; | |
} |
if [ -z "$NPM_TOKEN" ]; then | |
NPM_TOKEN=$(sed -En 's|^//registry\.npmjs\.org/:_authToken=(.*)|\1|p' ~/.npmrc); | |
fi |