Skip to content

Instantly share code, notes, and snippets.

Carl Youngblood cayblood

Block or report user

Report or block cayblood

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View prompt.bash
# display user@host and current working dir
PS1='\[$(tput setaf 2)\]\u\[$(tput sgr0)\]@\[$(tput setaf 3)\]\h\[$(tput sgr0)\] \w'
# display git info if applicable
PS1=$PS1'\[$(tput setaf 5)\]`if [ "$(vcprompt)" != "" ]; then echo " $(vcprompt | tr -d '"'"'[:space:]'"'"')"; fi`'
# display rvm info if applicable
PS1=$PS1'\[$(tput setaf 1)\] [`if [ "$(~/.rvm/bin/rvm-prompt)" != "" ]; then echo "$(~/.rvm/bin/rvm-prompt)"; fi`]\[$(tput sgr0)\]'
# display nvm info if available
View amb-workshop.txt
1. Visit https://awslabs1.awsapps.com/start/
2. Log in with your username and password
3. Your AMB network should already be created with the following settings:
NetworkName acme
NetworkDescription ACME consortium blockchain
Edition STARTER
FirstMemberName ACME1stMember
FirstMemberDescription The first member in the ACME consortium
FirstMemberAdminUsername acme1admin
@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 / polymer_setup.js
Last active Jan 17, 2019
Adding custom elements needs to wait until after polymer-ready
View polymer_setup.js
// 1. Load Polymer before any code that touches the DOM.
var script = document.createElement("script");
script.src = "/base/bower_components/webcomponentsjs/webcomponents.js";
document.getElementsByTagName("head")[0].appendChild(script);
// Delay Jasmine specs until WebComponentsReady
var POLYMER_READY = false;
beforeEach(function(done) {
window.addEventListener('polymer-ready', function () {
@cayblood
cayblood / gist:1440190
Created Dec 6, 2011
example of using the ruby sequel gem to access a sqlite3 database on jruby
View gist:1440190
#############################################################################
# to use this in jruby:
#
# jgem install sequel
# jgem install jdbc-sqlite3
#
# for more info on the sequel library, go to http://sequel.rubyforge.org/
#############################################################################
require 'rubygems'
@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 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" ;
You can’t perform that action at this time.