Skip to content

Instantly share code, notes, and snippets.

View npodonnell's full-sized avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
@fed-franz
fed-franz / bitcoin-core-build-fedora.sh
Last active October 28, 2018 00:57
Bitcoin-Core-Build-Fedora
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel python3
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/
./autogen.sh
./configure #--without-gui
make
@thejmazz
thejmazz / .babelrc
Created February 16, 2016 18:17
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
@Joeviocoe
Joeviocoe / qvm-portfwd-iptables
Last active June 16, 2021 11:40 — forked from daktak/qvm-exposeip.sh
Qubes-os port forwarding to allow external connections
#!/bin/sh
# Inspired by https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5
# Inspired by https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369
ip() { qvm-prefs -g -- "$1" ip; }
netvm() { qvm-prefs -g -- "$1" netvm; }
forward() {
local from_domain=$1
local to_domain=$2
@willglynn
willglynn / gist:3395441349765803a5b28657a782c719
Created July 28, 2016 17:20
ec2-bundle-and-upload-image example
$ wget -q http://stable.release.core-os.net/amd64-usr/1068.8.0/coreos_production_ami_image.bin.bz2
$ 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
@snorfsneflin
snorfsneflin / LUKS.sh
Created January 16, 2016 22:40
LUKS (Linux Unified Key Setup-on-disk-format) Encryption Examples
#!/bin/bash
#install cryptsetup
apt-get install cryptsetup
#initializes the volume, and sets an initial key or passphrase
cryptsetup -y -v luksFormat /dev/xvdc
#the following command create a mapping
cryptsetup luksOpen /dev/xvdc backup2
#!/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()
@jingzhehu
jingzhehu / CMakeLists.txt
Created February 26, 2017 15:36
Clion meets bitcoin.
cmake_minimum_required(VERSION 3.3)
project(bitcoin)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_custom_target(build-bitcoin ALL
COMMAND ./autogen.sh
COMMAND ./configure
COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@briantjacobs
briantjacobs / config.yml
Created November 24, 2015 19:43
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@bellbind
bellbind / ecc.py
Created December 1, 2011 08:08
[python]basics of elliptic curve cryptography
# Basics of Elliptic Curve Cryptography implementation on Python
import collections
def inv(n, q):
"""div on PN modulo a/b mod q as a * inv(b, q) mod q
>>> assert n * inv(n, q) % q == 1
"""
for i in range(q):
if (n * i) % q == 1:
@uuklanger
uuklanger / howto_setup_pylint_with_pycharm.md
Last active December 4, 2023 20:44
HOWTO - Setup pylint with PyCharm and the PyLint Plugin

Overivew

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.