Skip to content

Instantly share code, notes, and snippets.

View npodonnell's full-sized avatar

npodonnell npodonnell

View GitHub Profile
kyle0r /
Last active January 22, 2024 13:18 — 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 December 4, 2023 20:44
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 March 24, 2024 05:31 — 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 June 16, 2021 11:40 — forked from daktak/
Qubes-os port forwarding to allow external connections
# 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 March 19, 2024 09:37
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 October 28, 2018 00:57
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 February 26, 2017 15:36
Clion meets bitcoin.
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 April 3, 2024 15:44
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 July 28, 2016 17:20
ec2-bundle-and-upload-image example
$ 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