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() {
@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
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
#!/usr/bin/env ruby
# check for whitespace errors
git_ws_check = `git diff-index --check --cached HEAD --`
unless $?.success?
puts git_ws_check
exit 1
end
COOKBOOK_PATH = File.split `git rev-parse --show-toplevel`

Checklist - Ideal Ops

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram
  • Accurate / up-to-date network diagram
  • Out-of-hours support plan
  • Incident management plan