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
From c6802bcf9f23007e573f2655e9d57c177e1279b5 Mon Sep 17 00:00:00 2001 | |
From: Joseph Glanville <[email protected]> | |
Date: Sun, 20 May 2012 16:30:11 +0000 | |
Subject: [PATCH] Add abstract create_ config option to create arbitary interfaces. | |
This patch allows the creation of any interface supported by the | |
underlying NETLINK interface of iproute2. | |
To create an interface simply supply a create_${iface} line in | |
your /etc/conf.d/net file. |
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
require 'rethinkdb' | |
require 'celluloid' | |
include RethinkDB::Shortcuts | |
LOCK_TIMEOUT = 15 | |
UPDATE_TIMEOUT = 5 | |
r.connect.repl |
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
#!/usr/bin/env python | |
import rethinkdb as r | |
import gevent | |
import gevent.monkey | |
gevent.monkey.patch_all() | |
LOCK_TIMEOUT = 15 | |
UPDATE_TIMEOUT = 5 |
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
require 'netaddr' | |
require 'socket' | |
network = NetAddr::CIDR.create(ARGV[0]) | |
ips = Socket.ip_address_list.map {|a| a.ip_address} | |
ips.each do |ip| | |
if network.contains?(ip) | |
puts ip | |
exit | |
end | |
end |
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 | |
TARGET=$1 | |
mkdir -p $TARGET | |
files=$( | |
dpkg -L ruby | grep '/usr/bin/' | |
dpkg -L ruby1.9.1 | grep '/usr/bin/' | |
echo '/usr/lib/ruby' | |
) |
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
#!/usr/bin/env ruby | |
require 'aws' | |
elb = AWS::ELB.new | |
elb.load_balancers.each do |lb| | |
vuln = false | |
lb.policies.each do |pol| | |
if pol.attributes.include?('Protocol-SSLv3') | |
if pol.attributes['Protocol-SSLv3'] | |
vuln = true |
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
bios.bootorder = "hdd,CDROM" | |
checkpoint.vmstate = "" | |
cleanshutdown = "FALSE" | |
config.version = "8" | |
displayname = "flynn: default" | |
ehci.pcislotnumber = "-1" | |
ehci.present = "FALSE" | |
ethernet0.addresstype = "generated" | |
ethernet0.connectiontype = "nat" | |
ethernet0.present = "TRUE" |
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
amazon-ebs: The following packages have unmet dependencies: | |
amazon-ebs: linux-image-generic-lts-vivid : Depends: linux-image-extra-3.19.0-25-generic but it is not going to be installed | |
amazon-ebs: Recommends: thermald but it is not installable |
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
# create new app as your custom postgres provider | |
flynn create --remote "" custompg | |
# create a release using the latest postgresql image from /etc/flynn/bootstrap-manifest.json | |
flynn -a custompg release add -t docker -f config.json "https://dl.flynn.io/tuf?name=flynn/postgresql&id=30f08003a029c5d5958263bf923d0377c958b313d417ba49489ff9c5940a388b" | |
# modify the app deployment strategy to "postgres" | |
flynn -a controller pg psql <<< "UPDATE apps SET strategy = 'postgres' WHERE name = 'custompg';" | |
# scale postgres and web to 3 and 2 processes respectively |
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
rant@flynn:~/go/src/github.com/flynn/flynn$ flynn -a gitreceive log | |
2015-09-01T18:51:47.337323Z app[app.flynn-1a5e958e-8762-4185-8dab-070d2a5eefe8]: t=2015-09-01T18:51:47+0000 lvl=info msg="request started" component=gitreceive req_id=fd4f1271-7157-49ea-94c4-511491c2b1c0 method=GET path=/.well-known/status client_ip=100.100.49.11 | |
2015-09-01T18:51:47.341201Z app[app.flynn-1a5e958e-8762-4185-8dab-070d2a5eefe8]: t=2015-09-01T18:51:47+0000 lvl=info msg="request completed" component=gitreceive req_id=fd4f1271-7157-49ea-94c4-511491c2b1c0 status=200 duration=3.351599ms | |
2015-09-01T18:53:59.165330Z app[app.flynn-1a5e958e-8762-4185-8dab-070d2a5eefe8]: t=2015-09-01T18:53:59+0000 lvl=info msg="request started" req_id=2d30b32a-a3ae-480b-a767-34d40adc7ab3 component=gitreceive method=GET path=/testapp.git/info/refs client_ip=192.0.2.100 | |
2015-09-01T18:53:59.165536Z app[app.flynn-1a5e958e-8762-4185-8dab-070d2a5eefe8]: t=2015-09-01T18:53:59+0000 lvl=info msg="request completed" req_id=2d30b32a-a3ae-480b-a767-34d40adc7ab3 compo |
OlderNewer