Skip to content

Instantly share code, notes, and snippets.

@wasi
wasi / five_minutes.yml
Created March 24, 2017 06:00 — forked from ryane/five_minutes.yml
five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: [email protected]
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub

manual install

sudo curl -fsSL -o /tmp/install-flynn https://dl.flynn.io/install-flynn
sudo bash /tmp/install-flynn --channel nightly
sudo flynn-host init --init-discovery
sudo flynn-host init --discovery __token__
zpool create flynn-default /dev/sdb1
sudo service flynn-host start
sudo CLUSTER_DOMAIN=demo.localflynn.com flynn-host bootstrap --min-hosts 3 --discovery __token__
@wasi
wasi / neural-style-ec2.txt
Last active September 23, 2016 18:07 — forked from elad/neural-style-ec2.txt
Running neural-style in EC2
Start a g2.2xlarge or better (GPU instance) with https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94
Login, username is ubuntu
Update a bunch of stuff and make sure cudnn R2 is used:
luarocks install image
luarocks install loadcaffe
luarocks install torch
luarocks install sys
@wasi
wasi / gist:f19de871ff91359cebd6
Created February 3, 2015 21:47
mentioned_logins_in
HTML::Pipeline::MentionFilter.mentioned_logins_in("hello @my friend") do |m, l, i|
"link_to(#{m[2..-1]})"
end
=> "hello link_to(my) friend"
title.gsub(/[^a-z0-9]+/i, '-')