Skip to content

Instantly share code, notes, and snippets.

Carl Youngblood cayblood

View GitHub Profile
@cayblood
cayblood / saltaires-deploy.sh
Created Apr 12, 2019
Saltaires static web site deployment script
View saltaires-deploy.sh
#!/bin/bash
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
View start-devbox.sh
#!/bin/bash
INSTANCE_ID=$(aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | {id: .InstanceId, name: .Tags[] | select(.Key == "Name") | .Value} | select(.name == "carl-development") | .id')
aws ec2 start-instances --instance-ids "$INSTANCE_ID"
@cayblood
cayblood / multipart
Last active Apr 11, 2019
User data to update a Route53 subdomain with the new IP address of an EC2 instance every time it boots. Instance must be assigned role with Route53 permissions.
View multipart
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
@cayblood
cayblood / tezos-baker-setup.sh
Last active Feb 17, 2019
How to set up a tezos baker on EC2 ubuntu 18.04
View tezos-baker-setup.sh
###############################################################
# TEZOS BAKING SETUP
#
# Technical overview: http://tezos.gitlab.io/mainnet/whitedoc/proof_of_stake.html
#
# other tools: https://github.com/bakechain/bakechain
# https://github.com/Cryptonomic/Deployments/wiki/Galleon:-Releases
#
# short link: http://bit.ly/tezos-baker
#
@cayblood
cayblood / tezzigator.sh
Last active May 19, 2018
Script to automatically execute the steps in Tezzigator baking tutorial https://medium.com/@Tezzigator/permanent-tezos-sandboxing-509368945c4a on Ubuntu 16.04 LTS
View tezzigator.sh
#!/bin/bash
git clone -b zeronet https://gitlab.com/tezos/tezos.git
cd tezos
curl https://gist.githubusercontent.com/cayblood/329d24a099555e9a436f55a1cb8eb541/raw/c120c025465edfc8fa6bf4bbdbbef1ac79181da6/dictator-key.patch | patch -p1
sudo add-apt-repository ppa:avsm/ppa
sudo apt-get update
sudo apt-get install ocaml-nox opam
opam init
opam update
View protocol.json
{
"bootstrap_accounts": [
["edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav", "4000000000000"],
["edpktzNbDAUjUk697W7gYg2CRuBQjyPxbEg8dLccYYwKSKvkPvjtV9", "4000000000000"],
["edpkuTXkJDGcFd5nh6VvMz8phXxU3Bi7h6hqgywNFi1vZTfQNnS1RV", "4000000000000"],
["edpkuFrRoDSEbJYgxRtLx2ps82UdaYc1WwfS9sE11yhauZt5DgCHbU", "4000000000000"],
["edpkv8EUUH68jmo3f7Um5PezmfGrRF24gnfLpH3sVNwJnV5bVCxL2n", "4000000000000"]
],
"dictator_pubkey": "edpkuSLWfVU1Vq7Jg9FucPyKmma6otcMHac9zG4oU1KMHSTBpJuGQ2"
}
View dictator-key.patch
diff --git a/src/proto_alpha/lib_protocol/src/constants_repr.ml b/src/proto_alpha/lib_protocol/src/constants_repr.ml
index edf3007..c34f23d 100644
--- a/src/proto_alpha/lib_protocol/src/constants_repr.ml
+++ b/src/proto_alpha/lib_protocol/src/constants_repr.ml
@@ -81,7 +81,7 @@ let default = {
Int64.(sub (shift_left 1L 56) 1L) ;
dictator_pubkey =
Signature.Public_key.of_b58check_exn
- "edpkugeDwmwuwyyD3Q5enapgEYDxZLtEUFFSrvVwXASQMVEqsvTqWu" ;
+ "edpkuSLWfVU1Vq7Jg9FucPyKmma6otcMHac9zG4oU1KMHSTBpJuGQ2" ;
View serve.sh
python -m SimpleHTTPServer 8000
@cayblood
cayblood / 0_reuse_code.js
Created Sep 17, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View output.txt
carl@Carls-MacBook-Pro ~/Source/work/divvy/candidate-homework/DavidCox/divvy [git:master] ruby-2.1.5
∴ cat README.md
divvy
This app enables fast searching of the baby name dataset found at `http://catalog.data.gov/dataset/2012-baby-names-ac0a2`
At startup, the app read the dataset from its source and loads it into a in-memory sqlite database. A single endpoint is then exposed to enable querying for sets of names that match a given string. A web interface is provided to aid in that querying.
Must have node and npm installed, with bower installed globally.
You can’t perform that action at this time.