I hereby claim:
- I am lmars on github.
- I am lmars (https://keybase.io/lmars) on keybase.
- I have a public key whose fingerprint is 6BFE 8AC3 30EA B9F9 317D 5837 9E4F E42F D94C 0795
To claim this, I am signing this object:
class Deployer | |
attr_accessor :current_id | |
attr_reader :image | |
def initalize(image) | |
@image = image | |
end | |
def start | |
self.current_id = run "docker run #{image}" |
FROM ubuntu:precise | |
# Set DEBIAN_FRONTEND to non-interactive to avoid useless warnings | |
ENV DEBIAN_FRONTEND noninteractive | |
# Update apt sources | |
RUN apt-get update | |
# Support adding PPAs | |
RUN apt-get install -y python-software-properties |
#!/usr/local/bin/ruby | |
# | |
# config-exec will render any files in /config and then exec | |
# whatever command was given on the command line. | |
# | |
# For example, if /config/etc/redis.conf.erb exists, then to | |
# render it into /etc/redis.conf and run Redis with the result: | |
# | |
# $ config-exec redis-server /etc/redis.conf |
require "socket" | |
require "openssl" | |
puts OpenSSL::OPENSSL_VERSION | |
socket = TCPSocket.new("127.0.0.1", 8081) | |
ssl_version = ARGV[0].to_sym | |
ssl_context = OpenSSL::SSL::SSLContext.new |
I hereby claim:
To claim this, I am signing this object:
# flynn scale web=2 | |
now=2014-06-02T15:14:46+0000 app=controller-scheduler fn=watchFormations app.id=6f98d85441b94de0bf003a40882db52a release.id=7afc7da66395445fa7a8372cdb915001 at=new | |
now=2014-06-02T15:14:46+0000 fn=rectify app.id=6f98d85441b94de0bf003a40882db52a release.id=7afc7da66395445fa7a8372cdb915001 type=web expected=2 actual=0 app=controller-scheduler at=update diff=2 | |
now=2014-06-02T15:14:46+0000 app=controller-scheduler fn=add app.id=6f98d85441b94de0bf003a40882db52a release.id=7afc7da66395445fa7a8372cdb915001 host.id=00687624bf25 job.id=032bb075d20a44eb8108117be085b5cb | |
now=2014-06-02T15:14:46+0000 app=controller-scheduler fn=add app.id=6f98d85441b94de0bf003a40882db52a release.id=7afc7da66395445fa7a8372cdb915001 host.id=00687624bf25 job.id=75197216462545ed9d5cb0d84081fe12 | |
# docker kill flynn-032bb075d20a44eb8108117be085b5cb | |
# job restarted immediately | |
now=2014-06-02T15:15:32+0000 app=controller-scheduler fn=watchHost host.id=00687624bf25 at=remove job.id=032bb075d20a44eb8108117be085b5cb event=stop | |
no |
# log ICMP packets | |
sudo iptables -t raw -A OUTPUT -p icmp -j TRACE | |
sudo iptables -t raw -A PREROUTING -p icmp -j TRACE | |
sudo modprobe ipt_LOG | |
# in the container | |
ping -c 1 8.8.8.8 |
You have a grid of cells in 2 dimensions. Each cell has 2 possible states, alive or dead. Each cell has 8 neighbours: above, below, left, right, and the 4 diagonals.
NUMERALS = { | |
'i' => 1, | |
'v' => 5, | |
'x' => 10, | |
'l' => 50, | |
'c' => 100, | |
'd' => 500, | |
'm' => 1000 | |
} |
string = 'ABCDE' | |
string.reverse.each_char do |numeral| | |
# inside this block numeral will be a character from the string | |
puts numeral | |
end | |
# This will output: | |
E | |
D |