Skip to content

Instantly share code, notes, and snippets.

View fud's full-sized avatar

Brenton Bills fud

  • Paypa Plane
  • Brisbane, Australia.
  • 16:21 (UTC +10:00)
View GitHub Profile
@fud
fud / find-duplicates-mongo.js
Created March 28, 2019 04:08
Finds duplicates from a particular table in mongo.
mongo staging-hapi.geniesolutions.com.au:27017/admin --quiet --eval "DBQuery.shellBatchSize = 2000; db.auth('admin', 'XXXXXX'); db.getCollection('QuestionnaireResponse').find({}, { _id:0, 'source.reference': 1});" | sort | uniq -c
@fud
fud / aliases
Created November 13, 2018 00:01
git diff --name-only alias.
git config --global alias.diffno 'diff --name-only'
@fud
fud / replay.py
Created October 24, 2018 02:14
Replay messages from a dead letter queue into main queue. Python + boto3
#!/usr/bin/env python
import boto3
import sys
import json
import time
import argparse
from termcolor import cprint
@fud
fud / python-init.sh
Created October 12, 2018 04:33 — forked from sio2boss/python-init.sh
Getting started on the right foot with python
# For linux python 3 instructions see https://gist.github.com/softwaredoug/a871647f53a0810c55ac
# Install python manager
brew install pyenv
# Install virtual environment manager
brew install pyenv-virtualenv
# Update your .zshrc
@fud
fud / output.txt
Created July 23, 2018 04:23
Running moneyd.
✘ billsb@Brentons-MacBook-Pro  ~/Code/moneyd-test  DEBUG=* moneyd xrp:start -t --admin-api-port 7769
88
88
88
88,dPYba,,adPYba, ,adPPYba, 8b,dPPYba, ,adPPYba, 8b d8 ,adPPYb,88
88P' "88" "8a a8" "8a 88P' `"8a a8P_____88 `8b d8' a8" `Y88
88 88 88 8b d8 88 88 8PP""""""" `8b d8' 8b 88
88 88 88 "8a, ,a8" 88 88 "8b, ,aa `8b,d8' "8a, ,d88
88 88 88 `"YbbdP"' 88 88 `"Ybbd8"' Y88' `"8bbdP"Y8
d8'
@fud
fud / output.txt
Created June 20, 2018 08:13
Trouble producing cargo docs..
cargo doc -p stm32f1 --open
Documenting cortex-m v0.3.1
Documenting cortex-m v0.4.3
error: `[::task::Poll]` cannot be resolved, ignoring it...
|
note: lint level defined here
--> /Users/billsb/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-0.3.1/src/lib.rs:11:9
|
11 | #![deny(warnings)]
| ^^^^^^^^
@fud
fud / output.txt
Created June 20, 2018 08:12
Trouble producing cargo docs..
cargo doc -p stm32f1 --open
Documenting cortex-m v0.3.1
Documenting cortex-m v0.4.3
error: `[::task::Poll]` cannot be resolved, ignoring it...
|
note: lint level defined here
--> /Users/billsb/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-0.3.1/src/lib.rs:11:9
|
11 | #![deny(warnings)]
| ^^^^^^^^
@fud
fud / package.json
Created April 26, 2018 03:52
Righto.all play
{
"name": "righto-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
function saveSomething(something, callback){
var saved = righto(saveValue, something);
var updatedLastSavedTime = righto(updateLastSaveTime);
// We want the result of `saved`, but only after `updatedLastSavedTime` succeeds.
var result = righto.after(saved, updatedLastSavedTime);
result(callback);
}
@fud
fud / README.md
Created November 21, 2017 03:52 — forked from remarkablemark/README.md
Classes - ES5 vs ES6

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

Reference