Some files for talk about Productivity Hacks.
This file contains 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
library(dplyr) | |
library(ggplot2) | |
library(scales) | |
checksum <- function(bytes) { | |
Reduce(bitwXor, bytes) | |
} | |
# Generate message with: | |
# |
This file contains 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 | |
# Dowload lullabies from Rockabye Baby! for offline use. | |
# | |
# https://www.youtube.com/channel/UC7LesmfW8QPP7mDYYLwW4Aw | |
cat <<EOF | xargs youtube-dl --extract-audio --audio-format mp3 -- | |
tl9eIKqplXg | |
-UUZRR8G8UI | |
aHq1MDvf4Wc |
This file contains 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
// Configuration for Truffle development console. | |
// | |
module.exports = { | |
networks: { | |
development: { | |
host: "localhost", | |
port: 9545, | |
network_id: "*", | |
gas: 4000000 | |
} |
This file contains 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
// Configuration for testrpc. | |
// | |
module.exports = { | |
networks: { | |
development: { | |
host: "localhost", | |
port: 8545, | |
network_id: "*", | |
gas: 4000000 | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<opml version="1.0"> | |
<head> | |
<title>Andrew B. Collier subscriptions in Digg Reader</title> | |
</head> | |
<body> | |
<outline text="Hyndsight" title="Hyndsight" type="rss" xmlUrl="http://feeds.feedburner.com/ProfessorRobJHyndman" htmlUrl="http://robjhyndman.com" /></body> | |
</opml> |
Some files for talk about Productivity Hacks.
Setup:
Launch a t2.2xlarge instance (8 cores) on AWS.
- Start a tmux session. Create two horizontal panes (Ctrl-b ").
sudo apt update && sudo apt install -y htop r-base
wget -O buffon-needle.R http://bit.ly/2HieqWc
This file contains 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
functions { # User-defined functions [Optional] | |
} | |
data { # Data (external) [Optional] | |
} | |
transformed data { # Preprocess data [Optional] | |
} | |
parameters { # Model parameters (must precede model) [Mandatory] | |
} | |
transformed parameters { # Preprocess parameters [Optional] |
This file contains 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 | |
# Created a dated version of a file and persist on S3. | |
# | |
# Usage: | |
# | |
# dated-backup.sh file-to-backup.txt s3://name-of-bucket/ | |
FILE=$1 | |
BUCKET=$2 |
This file contains 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 | |
# $ s3-backup data-file.txt s3://my-backup-folder | |
# | |
# Install under /usr/bin/ if it will be run from cron. | |
FILEPATH=$1 | |
FILENAME=`basename $FILEPATH` | |
FILEDATE=`date +%Y%m%d-%H%M`-$FILENAME |
OlderNewer