Skip to content

Instantly share code, notes, and snippets.

View douglasjarquin's full-sized avatar

Douglas Jarquin douglasjarquin

View GitHub Profile
@douglasjarquin
douglasjarquin / rundeck_executions_cleanup.sh
Last active November 17, 2022 20:52 — forked from shamil/rundeck_executions_cleanup.sh
Rundeck executions cleanup
#!/bin/bash -e
# see related issue: https://github.com/rundeck/rundeck/issues/357
# export required vars
export RD_URL=http://localhost:4440 RD_USER=admin RD_PASSWORD=admin RD_HTTP_TIMEOUT=300
# make sure rd & jq commands are in the PATH
which -- rd jq >/dev/null
del_executions() {
<?php echo $_SERVER['HTTP_CF_CONNECTING_IP']; ?>
<br>
<br>
<br>
<?php echo $_SERVER['HTTP_CF_RAY']; ?>
@douglasjarquin
douglasjarquin / git-revision-hook.sh
Last active July 23, 2018 21:31 — forked from ThomDietrich/git-create-revisioninfo-hook.sh
git hook for revision and branch version file
#!/usr/bin/env bash
# Automatically generate a file with git branch and revision info
#
# Example:
# a830382
#
# Install:
# $ cp git-create-revisioninfo-hook.sh .git/hooks/post-commit
# $ cp git-create-revisioninfo-hook.sh .git/hooks/post-checkout
@douglasjarquin
douglasjarquin / how-to-rasta
Created March 9, 2018 18:28
Rastafarian Language Course
_ __ __ _ ___| |_ __ _ / _| __ _ _ __(_) __ _ _ __
| '__/ _` / __| __/ _` | |_ / _` | '__| |/ _` | '_ \
| | | (_| \__ \ || (_| | _| (_| | | | | (_| | | | |
|_| \__,_|___/\__\__,_|_| \__,_|_| |_|\__,_|_| |_|
_ ___ _
__ _____ _ __ __| |___ ( _ ) _ __ | |__ _ __ __ _ ___ ___ ___
\ \ /\ / / _ \| '__/ _` / __| / _ \/\ | '_ \| '_ \| '__/ _` / __|/ _ \/ __|
\ V V / (_) | | | (_| \__ \ | (_> < | |_) | | | | | | (_| \__ \ __/\__ \
\_/\_/ \___/|_| \__,_|___/ \___/\/ | .__/|_| |_|_| \__,_|___/\___||___/
<!-- ADJUST THE PURCHASE FORM'S BACKGROUND COLOR. -->
.buy-form-main { background-color: red !important; }
<!-- ADJUST THE FONT OF YOUR PRODUCT DESCRIPTION. -->
.product-main blockquote.product-description { font-family: garamond !important; }
<!-- CHANGE THE PRICE TAG COLOR AND FONT COLOR. -->

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.

Implementation detail: If each link in the chain (called

@douglasjarquin
douglasjarquin / renamedb
Created May 9, 2017 03:11 — forked from centminmod/renamedb
renamedb
#!/bin/bash
# Copyright 2013 Percona LLC and/or its affiliates
set -e
if [ -z "$3" ]; then
echo "rename_db <server> <database> <new_database>"
exit 1
fi
db_exists=`mysql -h $1 -e "show databases like '$3'" -sss`
if [ -n "$db_exists" ]; then
echo "ERROR: New database already exists $3"
@douglasjarquin
douglasjarquin / the_day_i_will_die.py
Created March 25, 2017 15:17 — forked from hugs/the_day_i_will_die.py
Inspired by Kevin Kelly's "My Life Countdown" - in Python
# Inspired by: http://kk.org/ct2/2007/09/my-life-countdown-1.php
# Life expectancy data:
# http://www.health.state.ny.us/health_care/medicaid/publications/docs/adm/06adm-5att8.pdf
$ python
>>> from datetime import date, timedelta
>>> birth_year = 1976
>>> birth_date = date(1976,3,2)
>>> life_expectancy = 76.09
# Stop timing out connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 20
# SSH Connection pooling for faster additional connections to a machine
#ControlMaster auto
#ControlPath /tmp/ssh_mux_%h_%p_%r
# This makes subsequent connections go faster
@ Wealth Defined
MONTHLY = $100,000 = $100,000.00
INTEREST = 6 = 6
BALLER = INTEREST% of what is MONTHLY = $1,666,666.67
Total in the bank: INTEREST% of what is BALLER = $27,777,777.78