Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
awk=$(which awk || echo 'missing: install awk' && exit 1) | |
# update apt | |
sudo apt-get update | |
# get ssl related packages from simulated upgrade | |
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get -y install |
#!/bin/bash | |
awk=$(which awk || echo 'missing: install awk' && exit 1) | |
# update apt | |
sudo apt-get update | |
# get ssl related packages from simulated upgrade | |
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install |
#!/bin/bash | |
awk=$(which awk || echo 'missing: install awk' && exit 1) | |
# update apt | |
sudo apt-get update | |
# get ssl related packages from simulated upgrade | |
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install -y |
-sws_flags fast_bilinear -sws_dither auto | |
-sws_flags fast_bilinear -sws_dither none | |
-sws_flags fast_bilinear -sws_dither bayer | |
-sws_flags fast_bilinear -sws_dither ed | |
-sws_flags fast_bilinear -sws_dither a_dither | |
-sws_flags fast_bilinear -sws_dither x_dither | |
-sws_flags fast_bilinear+accurate_rnd -sws_dither auto | |
-sws_flags fast_bilinear+accurate_rnd -sws_dither none | |
-sws_flags fast_bilinear+accurate_rnd -sws_dither bayer | |
-sws_flags fast_bilinear+accurate_rnd -sws_dither ed |
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 <
em |
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'json' | |
options = {} | |
OptionParser.new do |opts| | |
opts.banner = "Usage: example.rb [options]" | |
opts.on("-x", "--extended", "Use awesome print") do |*| |
class Todo < ActiveRecord::Base | |
concerning :EventTracking do | |
included do | |
has_many :events | |
end | |
def latest_event | |
... | |
end |
# 1. in one file, assuming that Foo is loaded/auto-loaded | |
class Foo | |
def monkey_patch | |
# ... | |
end | |
end | |
# 2. later, the real Foo (in another file) is loaded | |
class Foo < File | |
end |