Skip to content

Instantly share code, notes, and snippets.

View npodonnell's full-sized avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
@npodonnell
npodonnell / bitcoind_ubuntu_setup.md
Last active April 23, 2024 18:56
Bitcoind Ubuntu Setup

Bitcoind Ubuntu Setup

N. P. O'Donnell, 2021

Getting Bitcoind

ARCH=x86_64
BITCOIN_VERSION=0.21.0
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-$ARCH-linux-gnu.tar.gz
@npodonnell
npodonnell / electrs_litecoin_setup.md
Last active January 31, 2021 11:55
Electrs Litecoin Setup

Electrs Litecoin Setup

N. P. O'Donnell, 2021

Ubuntu instructions. More info can be found here

Install Dependencies

sudo apt update
@npodonnell
npodonnell / gpg_cheatsheet.md
Last active January 3, 2021 01:13
GPG Cheatsheet

GPG Cheatsheet

N. P. O'Donnell, 2021

Key Management

List Secret Keys:

gpg --list-secret-keys
@npodonnell
npodonnell / groovy_crash_course.md
Last active January 3, 2021 22:34
Groovy Crash Course

Groovy Crash Course

N. P. O'Donnell, 2021

Groovy and Java

Groovy runs in the JVM. All valid Java is valid Groovy.

Hello World

@npodonnell
npodonnell / worker.py
Last active December 29, 2020 22:25
Python Worker
#!/usr/bin/env python3
# Simple worker which can run a function in a different thread, and
# catch exceptions so they can be handled in the calling thread.
#
# N. P. O'Donnell, 2020
from threading import Thread
from typing import Callable
import random
import time
@npodonnell
npodonnell / elliptic_curves.py
Last active February 16, 2021 13:31
Elliptic Curves
#!/usr/bin/env python3
# Elliptic Curve functions
# For educational purposes only.
#
# N. P. O'Donnell, 2020-2021
from math import inf
import random
@npodonnell
npodonnell / git_cheatsheet.md
Last active June 22, 2022 09:01
Git Cheatsheet

Git Cheatsheet

N. P. O'Donnell, 2020

Remotes

List all commits on all remotes:

for c in $(git rev-list --remotes); do git show $c | head -n8; done | less
@npodonnell
npodonnell / crypto_number_theory.py
Last active July 25, 2023 12:42
Crypto Number Theory
#!/usr/bin/env python3
#
# Crypto & Number Theory
# N. P. O'Donnell, 2020
def odd(a):
"""
Is a odd?
"""
@npodonnell
npodonnell / number_theory.hs
Last active December 29, 2020 01:50
Number Theory in Haskell
-- Number Theory stuff
-- N. P. O'Donnell, 2020
module NumberTheory (congruent, factors, prime, extendedEuclideanAlgorithm, greatestCommonDivisor, lowestCommonMultiple, coPrime) where
-- Euclidean division of two integers
euclideanDivision :: Integer -> Integer -> Integer
euclideanDivision a b = toInteger (floor ((fromIntegral a) / (fromIntegral b)))
@npodonnell
npodonnell / jenkins_cheatsheet.md
Last active January 2, 2021 21:38
Jenkins Cheatsheet

Jenkins Cheatsheet

N. P. O'Donnell, 2020-21

Run in Docker

Get the Jenkins docker image:

docker pull jenkins/jenkins