Skip to content

Instantly share code, notes, and snippets.

@kirkins
kirkins / check-wallets.sh
Created February 14, 2019 16:32
For checking the balance of several bitcoin addresses in a text file
#!/usr/bin/env bash
# For format of 64 chars without 0x at the start
# Source script from: https://github.com/grondilu/bitcoin-bash-tools.git
source ./bitcoin.sh
while read k; do
PUBLIC=$(newBitcoinKey 0x$k \
| grep bitcoin\ address \
| head -1 \
@kirkins
kirkins / check-wallet.sh
Last active February 14, 2019 16:31
Check the current balance from a list of private bitcoin keys
#!/usr/bin/env bash
# For keys in format of 66 chars starting with 0x
# Source script from: https://github.com/grondilu/bitcoin-bash-tools.git
source ./bitcoin.sh
while read k; do
WALLET=$(newBitcoinKey $k \
| grep bitcoin\ address \
| cut -f 2 -d ":" \
@kirkins
kirkins / links.sh
Last active February 6, 2019 06:16
Extract telegram links from exported chat
@kirkins
kirkins / gist:256627c9a5a0765673f44e8dd48fbda9
Last active January 31, 2019 04:13
Starbucks bulk card checker
#!/usr/bin/env bash
echo ""
while IFS=, read -r CARD_NUMBER CARD_PIN
do
printf "$CARD_NUMBER "
wget -O - -o /dev/null https://www.starbucks.com/card/guestbalance --post-data="Card.Number=$CARD_NUMBER&Card.Pin=$CARD_PIN" \
| grep fetch_balance_value \
| grep -oP '\>\K[^</]+'
done < cards.csv
@kirkins
kirkins / gist:04aa683be4063d81ee3412b5f0a3d9f0
Created January 30, 2019 22:57
Get starbucks balance on bash
wget -O - -o /dev/null https://www.starbucks.com/card/guestbalance --post-data="Card.Number=$CARD_NUMBER&Card.Pin=$CARD_PIN" | grep fetch_balance_value
@kirkins
kirkins / Makefile
Created October 29, 2018 17:02
fizz buzz in a makefile, found online
range = $(if $(filter $1,$(lastword $3)),$3,$(call range,$1,$2,$3 $(words $3)))
make_range = $(foreach i,$(call range,$1),$(call range,$2))
equal = $(if $(filter-out $1,$2),,$1)
limit := 101
numbers := $(wordlist 2,$(limit),$(call range,$(limit)))
threes := $(wordlist 2,$(limit),$(call make_range,$(limit),2))
fives := $(wordlist 2,$(limit),$(call make_range,$(limit),4))
@kirkins
kirkins / bot.js
Last active October 5, 2018 18:52
const botBuilder = require('claudia-bot-builder');
const AIMLInterpreter = require('aimlinterpreter');
var aimlInterpreter = new AIMLInterpreter({name:'Philip', age:'42'});
aimlInterpreter.loadAIMLFilesIntoArray(["aiml/bot.aiml"]);
module.exports = botBuilder(function (request) {
});
module.exports = botBuilder(message => {
aimlInterpreter.findAnswerInLoadedAIMLFiles("how do you work?", function(answer, wildCardArray, input){
@kirkins
kirkins / Verifying my Peepeth
Created August 27, 2018 17:54
Verifying my Peepeth
Verifying my identity on Peepeth.com 0xe07e487d5a5e1098bbb4d259dac5ef83ae273f4e
@kirkins
kirkins / .bashrc
Last active April 30, 2018 15:55
Command to quickly clear out everything in default namespace on k8s
# command to remove all deployments, services, and pods, with y/N prompt
cleankube() {
read -r -p "Are you sure you want to delete all deployments, services, and pods? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
kubectl delete deployment --all && kubectl delete pods --all && kubectl delete services --all
;;
*)
esac
}
@kirkins
kirkins / Dockerfile
Created April 25, 2018 22:15
A docker file running a simple script to check if a port is open every 15 seconds
FROM alpine
MAINTAINER kirkins@gmail.com
# Checks if a port is open every 15 seconds
# Set the following variables
ENV WEBSITE google.com
ENV PORT 777
ENV PORT_DOWN_MSG 'Port is down send this message via email/text/ect'