Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am irisli on github.
* I am irisli (https://keybase.io/irisli) on keybase.
* I have a public key whose fingerprint is 45DC 82FC 43C3 4C0B FAA4 940A B9CA 72E7 09C3 A153
To claim this, I am signing this object:
@irisli
irisli / stellarCurrencyDetector.js
Created September 4, 2014 00:00
Detects which characters are valid in Stellar.
// Ways to use this:
// node stellarCurrencyDetector.js | sh
// node stellarCurrencyDetector.js | sh > stellarCurrencyDetectorOutput.txt
// Test results can be seen here: https://www.stellar.org/viewer/#test/gHQbh2U1CzPo4kH93CCmL5oxK79SqcT7mm
var hexes = [];
for (var i = 0; i <= 255; i++) {
hexes.push(i.toString(16).toUpperCase());
}
@irisli
irisli / stellard-ws-timeout-test.js
Last active August 29, 2015 14:07
live.stellard.org timeout test
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() {
#!/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
@irisli
irisli / gist:87d3b964d51648ce0763
Created February 12, 2015 21:58
Bundlr link scraper
// 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';
});
@irisli
irisli / stellar-58-frequency.txt
Created June 12, 2015 22:29
first characters of Stellar address base58 by frequency. Sample size is 220768 (65 times the number of possibilities not taking into account illegal combinations (58^2))
2099 gsg
2074 gsp
2063 gsX
2058 gsZ
2055 gsB
2046 gsj
2038 gsD
2035 gst
2035 gsh
2033 gsE
@irisli
irisli / gist:6e95763e91ce5013c6c2
Created June 18, 2015 03:36
stellar-58-frequency-first-two
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
@irisli
irisli / configure-make.txt
Created July 20, 2015 23:45
./configure && make
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
@irisli
irisli / creating-a-stellar-transaction.js
Last active November 5, 2015 17:12
Creating a Stellar transaction using JS Stellar SDK
// 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.
@irisli
irisli / child.html
Last active June 28, 2016 18:41
Iframe height sync
<html>
<head>
<!-- MAKE SURE THERE IS 0 PADDING OUTSIDE OF resizeWrapper-->
<style>
body, html {
padding: 0;
margin: 0;
}
</style>
</head>