This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input="keysends.txt" | |
while read -r line | |
do | |
# Make sure you change -a to the amount of sats you want to send, this script you run LND in a docker container called lnd | |
docker exec lnd lncli sendpayment --keysend --dest $line -a 1 | |
done < "$input" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
NC=`tput sgr0` | |
for hostnameFile in $(find ~/umbrel/tor/data/app* -name 'hostname' | sort) ; do | |
APPNAME=$(echo ${hostnameFile} | cut -d/ -f 7-7) | |
HOSTNAME=$(cat ${hostnameFile}) | |
printf "%-40s" ${RED}${APPNAME} | |
printf "%s" ${GREEN}${HOSTNAME} | |
printf "${NC}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies | |
sudo apt install --no-install-recommends qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils ovmf | |
# See netplan config below, apply with "sudo netplan apply" | |
# If you already have docker running, your bridge might not work as expected because it manages your iptables rules in a way which causes problems with forwarding, below command will fix that | |
sudo iptables -P FORWARD ACCEPT | |
# Install HassOS with the QCOW2 image from https://www.home-assistant.io/hassio/installation/#alternative-install-on-a-generic-linux-host | |
# The below command also allows you to log in using VNC, useful for debugging | |
sudo virt-install --name hassos --graphics vnc,listen=0.0.0.0 --memory=2048 --vcpus=2 --disk=/var/homeassistant/hassos_ova-4.11.qcow2,format=qcow2 --boot uefi --import --os-variant=debian9 --network=bridge=br0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:set ft=dockerfile: | |
FROM alpine:3.4 | |
MAINTAINER Djuri Baars <[email protected]> | |
# alpine includes "postgres" user/group in base install | |
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh | |
# /etc/group:34:postgres:x:70: | |
# su-exec (gosu-compatible) is installed further down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlstarlet sel -T -t -m /lei:LEIData/lei:LEIRecords/lei:LEIRecord -v "concat(lei:LEI, ';', lei:Entity/lei:LegalName, ';', lei:Entity/lei:EntityStatus, ';', lei:Entity/lei:LegalJurisdiction, ';', lei:Entity/lei:BusinessRegisterEntityID, ';', lei:Entity/lei:BusinessRegisterEntityID/@register)" -n ~/Downloads/20160625-GLEIF-concatenated.xml > LEIdata.csv | |
csvclean -d ';' LEIdata.csv | |
mongoimport -d lei -h dbserver -c records --type csv --file LEIdata_out.csv --fields "lei,name,status,jurisdiction,entity_id,register" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
SRCMOUNT = "/hyperledger" | |
LOCALDEV = "/local-dev" | |
VM_CPUS = 2 | |
VM_MEM = 4096 | |
Vagrant.configure(2) do |config| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hateoas\Representation\CollectionRepresentation: | |
exclusion_policy: all | |
exclude: false | |
expose: true | |
properties: | |
rel: | |
exclude: false | |
expose: true | |
groups: [ Default, Hateoas ] | |
resources: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kafka import KafkaClient, SimpleProducer, SimpleConsumer | |
kafka = KafkaClient("bigdatavm:9092") | |
producer = SimpleProducer(kafka) | |
data = [] | |
f = open('part0.txt', 'rU') | |
lines = f.read().splitlines() | |
for line in lines: |
NewerOlder