Skip to content

Instantly share code, notes, and snippets.

View jackcoble's full-sized avatar

Jack Coble jackcoble

  • United Kingdom
  • 16:16 (UTC)
View GitHub Profile
@katopz
katopz / setup-zeromq.sh
Last active August 10, 2021 21:47 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@umidjons
umidjons / aes-256-cbc-nodejs-crypto.md
Last active March 13, 2022 07:12
AES-256-CBC example in Node.js using crypto module

AES-256-CBC example in Node.js using crypto module

'use strict';
const crypto = require('crypto');

// get password's md5 hash
let password = 'test';
let password_hash = crypto.createHash('md5').update(password, 'utf-8').digest('hex').toUpperCase();
console.log('key=', password_hash); // 098F6BCD4621D373CADE4E832627B4F6
@t4sk
t4sk / wif.md
Last active August 1, 2023 20:15
How to convert private key to WIF

How to convert private key to WIF

0. Overview

WIF = base58check encode ([version byte][private key][checksum])

version byte = 80 for mainnet, ef for testnet and regtest

checksum = first 4 bytes of double SHA256 of private key
@markjlorenz
markjlorenz / simple-exec-with-docker-remote-api.sh
Created July 23, 2016 16:05
Using the exec command with the docker API, and capturing output
#! /usr/bin/env bash
# Create the container with a long running process. If PID1 exists before
# we send the exec commands, they will fail because the container is not running
#
CONTAINER_NAME="TEST-`uuidgen`"
curl --silent --unix-socket /var/run/docker.sock "http:/containers/create?name=${CONTAINER_NAME}" -XPOST \
-H "Content-Type: application/json" \
-d '{
"Image": "ruby:latest",