This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 8 disk raid 0 | |
# sudo mdadm --create --verbose /dev/md0 --level=0 --name=EPHEMERAL_RAID --raid-devices=8 /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf /dev/xvdg /dev/xvdh /dev/xvdi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I made this gist in hopes that it is a good tutorial on creating, signing, | |
// and submitting a transaction using JS Stellar SDK. | |
// This gist assumes that you have: | |
// 1. Secret key of a funded account to be the source account | |
// 2. Public key of a funded account as a recipient | |
// 3. Access to JS Stellar SDK (https://github.com/stellar/js-stellar-sdk) | |
// This code can be run in the browser at https://www.stellar.org/developers/ | |
// That site exposes a global StellarSdk object you can use. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ip-172-31-34-58:~/stellar-core (master)./configure | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /bin/mkdir -p | |
checking for gawk... gawk | |
checking whether make sets $(MAKE)... yes | |
checking whether make supports nested variables... yes | |
checking whether UID '1000' is supported by ustar format... yes | |
checking whether GID '1000' is supported by ustar format... yes | |
checking how to create a ustar tar archive... gnutar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First two characters. Total in data set is 220768 | |
108914 gs | |
2088 g3 | |
2067 g6 | |
2056 gG | |
2055 go | |
2052 gy | |
2050 gd | |
2050 gV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2099 gsg | |
2074 gsp | |
2063 gsX | |
2058 gsZ | |
2055 gsB | |
2046 gsj | |
2038 gsD | |
2035 gst | |
2035 gsh | |
2033 gsE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var stackTrace = (new Error()).stack; // Only tested in latest FF and Chrome | |
var callerName = stackTrace.replace(/^Error\s+/, ''); // Sanitize Chrome | |
callerName = callerName.split("\n")[1]; // 1st item is this, 2nd item is caller | |
callerName = callerName.replace(/^\s+at Object./, ''); // Sanitize Chrome | |
callerName = callerName.replace(/ \(.+\)$/, ''); // Sanitize Chrome | |
callerName = callerName.replace(/\@.+/, ''); // Sanitize Firefox | |
console.log(callerName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This formats dates like how Twitter does on their tweets I originally wrote | |
// this because I did not want to add an external dependency (such as moment) to | |
// my project for something so insignificant (date format). I couldn't have | |
// easily generated it on the server side since the dates are relative to the | |
// end user's browser's timezone (and I specifically wrote this to run on the | |
// client). | |
// | |
// Usage: twitterDateFormat(time) | |
// time can be anything JS' Date can understand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I originally hacked together this script to scrape links from this bundlr page: http://bundlr.com/b/stellar-press | |
(function(){ | |
result = ""; | |
$("#bundle-clips-list > li").each(function(k,v) { | |
title = $(v).find(".clip-title").text().trim(); | |
url = $(v).attr('data-clip-url'); | |
result += '<p><a href="' + url + '">' + title + '</a></p>\n'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function flask-boilerplate-tmux | |
{ | |
# https://github.com/swaroopch/flask-boilerplate | |
BASE="$HOME/code/flask-boilerplate" | |
cd $BASE | |
tmux start-server | |
tmux new-session -d -s flaskboilerplate -n model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocket = require('ws') | |
, ws = new WebSocket('ws://live.stellar.org:9001'); | |
var start = null; | |
var accounts = ['gDSSa75HPagWcvQmwH7D51dT5DPmvsKL4q']; | |
ws.on('open', function() { | |
console.log('WebSocket connection opened.'); | |
start = new Date(); | |
setInterval(function() { |