Skip to content

Instantly share code, notes, and snippets.


npodonnell npodonnell

View GitHub Profile
kyle0r /
Last active Jan 19, 2023 — forked from vszakats/
shell/bash scripts for AWS S3 upload and download (signature v4)
# cite
# <bucket> <region> <source-file> <dest-file>
set -e
uuklanger /
Last active Jul 7, 2022
HOWTO - Setup pylint with PyCharm and the PyLint Plugin


Setting up a linter can help detect odd or non-typical coding practices. The following will describe how to setup PyCharm for basic linting with the PyCharm PyLint plugin.

This assumes you have a venv setup within your current project.

Install Pylint

For pylint for your current project venv the following two commands should be run in your project root. The first will install pylint and the second will create an rc file which you can then adjust for your current project.

luk6xff /
Last active Jan 25, 2023 — forked from bruce30262/
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

#!/usr/bin/env python3
# Reproduce Bitcoin ABC's deterministic Schnorr signature near end of key_tests.cpp
from ecdsa.numbertheory import jacobi
from ecdsa import SECP256k1
import hashlib
import hmac
G = SECP256k1.generator
p = SECP256k1.curve.p()
Joeviocoe / qvm-portfwd-iptables
Last active Jun 16, 2021 — forked from daktak/
Qubes-os port forwarding to allow external connections
View qvm-portfwd-iptables
# Inspired by
# Inspired by
ip() { qvm-prefs -g -- "$1" ip; }
netvm() { qvm-prefs -g -- "$1" netvm; }
forward() {
local from_domain=$1
local to_domain=$2
BretFisher /
Last active Sep 27, 2022
docker swarm upgrade

Replace your Swarm Manager and Workers with updated versions of docker

  • it's best to replace nodes, don't do apt/yum upgrades.
  • both would work, but VM replacment forces me to think of it as immutable and prevents making pets
  • if you don't want to update join scripts for manager IP's, then do something like Elastic IP's so manager IP's won't change.

Lets assume you have 3 managers and 3 workers on 17.06 and you want to update to 17.12

  • managers: m1, m2, m3
fed-franz /
Last active Oct 28, 2018
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel python3
git clone
cd bitcoin/
./configure #--without-gui
jingzhehu / CMakeLists.txt
Created Feb 26, 2017
Clion meets bitcoin.
View CMakeLists.txt
cmake_minimum_required(VERSION 3.3)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_custom_target(build-bitcoin ALL
COMMAND ./configure
phizaz /
Last active Jan 27, 2023
Python turn sync functions to async (and async to sync)
import functools
def force_async(fn):
turns a sync function to async function using threads
from concurrent.futures import ThreadPoolExecutor
import asyncio
pool = ThreadPoolExecutor()
willglynn / gist:3395441349765803a5b28657a782c719
Created Jul 28, 2016
ec2-bundle-and-upload-image example
View gist:3395441349765803a5b28657a782c719
$ wget -q
$ ec2-bundle-and-upload-image -image coreos_production_ami_image.bin.bz2 -s3-bucket totally-not-official-ami -s3-prefix ec2-bundle-and-upload-image/ -name "CoreOS-stable-1068.8.0"
2016/07/28 12:08:19 Using "-region us-east-1" to match S3 bucket
2016/07/28 12:08:19 Using "-account 123456789012" based on active credentials
2016/07/28 12:08:19 Determining size of compressed image...
2016/07/28 12:09:18 Compressed image is 4756340736 bytes
2016/07/28 12:09:18 Writing to s3://totally-not-official-ami/ec2-bundle-and-upload-image/CoreOS-stable-1068.8.0.part.0
2016/07/28 12:09:23 Writing to s3://totally-not-official-ami/ec2-bundle-and-upload-image/CoreOS-stable-1068.8.0.part.1
2016/07/28 12:09:28 Writing to s3://totally-not-official-ami/ec2-bundle-and-upload-image/CoreOS-stable-1068.8.0.part.2
2016/07/28 12:09:31 Writing to s3://totally-not-official-ami/ec2-bundle-and-upload-image/CoreOS-stable-1068.8.0.part.3