Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jashmenn's full-sized avatar

Nate Murray jashmenn

View GitHub Profile
const fs = require("fs");
const CoinGecko = require("coingecko-api");
const { table } = require("table");
const chalk = require("chalk");
const cg = new CoinGecko();
const coins = [
{ "id": "ethereum", "symbol": "ETH" },
{ "id": "bitcoin", "symbol": "BTC" },
@jashmenn
jashmenn / Dockerfile
Created January 15, 2021 19:46 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@jashmenn
jashmenn / dynamic_forms_builder.sql
Created August 19, 2020 15:48 — forked from firmanelhakim/dynamic_forms_builder.sql
Dynamic Forms Builder using PostgreSQL
CREATE TABLE master.forms
(
form_id serial NOT NULL,
code CHARACTER VARYING,
name CHARACTER VARYING,
description CHARACTER VARYING,
properties jsonb,
audit_trails jsonb,
stereotype CHARACTER VARYING,
sort_order INTEGER,
@jashmenn
jashmenn / git-selective-merge.md
Created April 21, 2017 16:16 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp
@jashmenn
jashmenn / pr.md
Created March 9, 2017 20:21 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

a = {
"annotations" => [
{
"x" => 19,
"y" => 20,
"w" => 50,
"h" => 50,
"predictions" => {
"green" => 0.2,
function sum (fn, xs) {
var toRet = 0;
for (var i = 0, ii = xs.length; i < ii; i++) {
toRet += fn(xs[i], i, xs);
}
return toRet;
}
function update(t, o) {
for (var k in o) {
BTCmsg Protocol v1 (2011-09-18)
===============================
Each message is represented by multiple payment which is calculated by
the following algorithm:
1. Two first chars for message type ('01' for md5, '02' for ascii).
2. Then the message in hex (python binascii.hexlify).
3. Split the long string to groups of 4 hex digits.
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is
represented by a payment in satoshi (maximum 0xffff=65535).
# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
@jashmenn
jashmenn / dpkg-gnutar
Created December 26, 2011 22:18 — forked from jedi4ever/dpkg-gnutar
homebrew formula to get dpkg working a mac
require 'formula'
class Tar <Formula
url 'http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz'
homepage 'http://www.gnu.org/software/tar/'
md5 '00d1e769c6af702c542cca54b728920d'
# depends_on 'cmake'
def install