Skip to content

Instantly share code, notes, and snippets.

@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 / 1-setupRaid.sh
Last active June 28, 2016 18:48
RAID setup for EC2 instances with ephemeral instance storage
# 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
@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>
@irisli
irisli / formfiller.js
Created July 2, 2016 01:03
Batch form filler
// Batch form filler to be used in the console
formValues = [
['foo','bar'],
['bar','baz'],
['baz','blah'],
['blah','blahblah'],
['wibble','wobble'],
['flob','wubble'],
]
@irisli
irisli / looprunner.sh
Created July 21, 2016 16:50
Run a background task and start it regularly
while true
do
./run.sh &
sleep 3600
sudo pkill -INT python
sleep 5
done
@irisli
irisli / __UC Berkeley Landmarks.md
Last active August 20, 2018 20:27
UC Berkeley landmarks coordinates (longitude and latitude) in JSON format

UC Berkeley landmarks coordinates (longitude and latitude) in JSON format

The js script converts xml files from the UC Berkeley website's map.

These may be outdated. Run the script yourself to get the latest data.

I do not own this data. I am simply converting the data between formats.

@irisli
irisli / GPG and git on macOS.md
Created September 20, 2016 22:08 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@irisli
irisli / bash-colors.md
Created October 4, 2016 04:07 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@irisli
irisli / colors.md
Last active October 6, 2021 18:13
Github Flavored Markdown (GFM) Colored text

Using diff: red/green monospaced text

+ Green.Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.
- Red. Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.
Black. Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.

Using code comments: gray text