Skip to content

Instantly share code, notes, and snippets.

View russellpierce's full-sized avatar

Russell S. Pierce russellpierce

View GitHub Profile
@joshuaulrich
joshuaulrich / intraday-sp500.R
Last active April 26, 2023 13:02
Track the S&P 500 throughout the trading day
require(quantmod)
do_chart <- function(symbol) {
quote <- getQuote(symbol)
quote$Close <- quote$Last
xts(OHLCV(quote), quote[,"Trade Time"],
pct_change = quote[,"% Change"])
}
filename <- "intraday-sp500.rds"
@pokle
pokle / gist:9271432
Last active August 22, 2017 16:01
Automatically mount the EC2 ephermal SSDs as raid0 on Ubuntu

Launch your EC2 EBS instance with two SSDs on the second and third slots (after the root EBS volume), with this in your userdata:

#!/usr/bin/env bash

umount /dev/xvdb
umount /dev/xvdc
apt-get install mdadm -y
mkdir /u01

cat > /etc/init/mount-ephermal-ssd.conf <

@joemiller
joemiller / raid_ephemeral.sh
Last active October 23, 2023 21:53
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"