Skip to content

Instantly share code, notes, and snippets.

View XertroV's full-sized avatar

Max Kaye XertroV

View GitHub Profile
@XertroV
XertroV / gist:d503a1e9db4bc1fd617c5ee20a619c4c
Created February 22, 2018 10:28
Copy of chat log from Flux slack - #dev - 21-22 Feb 2018

<continued from #general>

Sven Mason [15:52] I have not used Digital Ocean before (where the forum is currently hosted), it seems like there is more admin involved than eg AWS, but it is cheaper. Maybe AWS would take less admin resources than Digital Ocean once it is setup? Also AWS being the larger perhaps there is a higher chance supporters will have experience working with it? (this is if we chose a self-hosted environment). We could stay with Digital Ocean if Max wanted and try to fix what is going wrong there, to do that we could discuss admin access protocol with @max?

Max Kaye [16:51] Whoops - posted reply in #general @sventhebarbarian - Auto updates actually stopped working - it's manual updates that are breaking 😕 DO and AWS are equiv in terms of admin - DO is actually a bit nicer I think bc you can reset pws easily and share nodes much more easily (via a team) than you can with AWS

@XertroV
XertroV / gist:5001704845eeba1075c1abfb7fb1fc86
Created December 21, 2017 18:04
purescript docs error
Error found:
in module Test.QuickCheck.Gen
at <path>/bower_components/purescript-quickcheck/src/Test/QuickCheck/Gen.purs line 79, column 16 - line 79, column 52
No type class instance was found for
Control.Monad.Rec.Class.MonadRec (State
{ newSeed :: Seed
, size :: Int
}
@XertroV
XertroV / nsw-byron-group-e-results.sh
Last active September 10, 2016 10:35
simple script to say group e results as they're updated
MAXSOFAR='0';
GROUPEMAX='0'
while [ 1 ]; do
echo 'running';
CSV=$(curl -s http://votensw.info/data/byron-shire-council/first_preference_councillor.csv)
RESULTS=$(echo "$CSV" | tail -n 3 | head -n 1 | cut -d ',' -f 21 | tr -d $'\n' | tr -d $'\r');
GROUPETOTAL=$(echo "$CSV" | tail -n 25 | head -n 1 | cut -d ',' -f 21 | tr -d $'\n' | tr -d $'\r');
JIMMY=$(echo "$CSV" | tail -n 24 | head -n 1 | cut -d ',' -f 21 | tr -d $'\n' | tr -d $'\r')
echo "Got Results $RESULTS... Group E: $GROUPETOTAL... Jimmy: $JIMMY"
if [[ "$RESULTS" -eq "$MAXSOFAR" ]] ; then
@XertroV
XertroV / nsw-election-results-byron-alert.sh
Created September 10, 2016 09:35
little bash script to notify aurally when results come in for Byron Council Elections
NORESULTS='class="sum02"><tdcolspan="3">ProgressiveTotalVotes</td><tdclass="r"></td><tdclass="empty"></td><tdclass="empty"></td><tdclass="empty"></td></';
while sleep 1; do
echo 'running';
RESULTS=$(curl -s http://votensw.info/data/byron-shire-council/summary_councillor.html | tr -d ' ' | tr -d '\n' | sed 's/tr/\'$'\n/g' | grep sum02);
if [ "$RESULTS" == "$NORESULTS" ] ; then
echo 'no results' ;
# say 'no results' # debug only
else
echo 'results';
say 'results are in';
# First: from the HTTP debug interface (Which hung with the RPC command...)
## See below for `debug.stacks()`
```
goroutine 156 [running]:
runtime/pprof.writeGoroutineStacks(0x6b42108, 0xc82c353ee0, 0x0, 0x0)
/usr/local/opt/go/libexec/src/runtime/pprof/pprof.go:516 +0x84
runtime/pprof.writeGoroutine(0x6b42108, 0xc82c353ee0, 0x2, 0x0, 0x0)
/usr/local/opt/go/libexec/src/runtime/pprof/pprof.go:505 +0x46
> debug.stacks()
goroutine 487 [running]:
github.com/ethereum/go-ethereum/internal/debug.(*HandlerT).Stacks(0xc8200b7360, 0x0, 0x0)
/private/tmp/ethereum-20160716-84588-1tmln98/build/_workspace/src/github.com/ethereum/go-ethereum/internal/debug/api.go:177 +0x7b
reflect.Value.call(0x4933dc0, 0x4bb7468, 0x13, 0x4c01d08, 0x4, 0xc8202d4e10, 0x1, 0x1, 0x0, 0x0, ...)
/usr/local/opt/go/libexec/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x4933dc0, 0x4bb7468, 0x13, 0xc8202d4e10, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/opt/go/libexec/src/reflect/value.go:303 +0xb1
github.com/ethereum/go-ethereum/rpc.(*Server).handle(0xc8200190b0, 0x6eec120, 0xc8202380c0, 0x6856370, 0xc8200b79a0, 0xc829b52850, 0x0, 0x0, 0x48d0a40)
/private/tmp/ethereum-20160716-84588-1tmln98/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:323 +0x1260
@XertroV
XertroV / password_trainer.py
Created December 15, 2015 02:32
Password Trainer - simple script to remember a password and help you practise
#!/usr/bin/env python3
import getpass
import time
print("Please input your password carefully.")
password = getpass.getpass()
print("Thank you, please type it again to confirm")
p2 = getpass.getpass()
@XertroV
XertroV / pycoin-demo.py
Created August 15, 2015 04:01
pycoin demonstration: send all the coins at an address
#!/usr/bin/env python3
import os
import argparse
from binascii import hexlify, unhexlify
import sys
from urllib.error import HTTPError
from pycoin.key import Key
@XertroV
XertroV / randomize.dg
Created May 23, 2015 07:05
Randomly shuffle things with minimal bits (written in pyos/dg)
#!/usr/bin/env python3 -m dg
import '/hashlib'
import '/time'
Counter = subclass object where
__init__ = self ->
self.c = 0
None
### Keybase proof
I hereby claim:
* I am XertroV on github.
* I am xertrov (https://keybase.io/xertrov) on keybase.
* I have a public key whose fingerprint is 38E4 5128 27C9 78CF 6C68 AE99 FEF3 5F69 AAAC E7FE
To claim this, I am signing this object: