Skip to content

Instantly share code, notes, and snippets.

View Atalanta's full-sized avatar

Stephen Nelson-Smith Atalanta

  • Ticketmaster
  • Hampshire, UK
View GitHub Profile
it "has a timer that does a thing" do
inspec.command('su -lc "source /root/.bashrc root"')
expect(command("systemctl list-units --type=timer").stdout).to match /run-\d+.timer\s+loaded active waiting.*thing/
end
begin
users_queue.subscribe(:manual_ack => true, :block => true) do |delivery_info, properties, body|
sf, wm, em = *JSON.parse(body)
p [sf, wm , em]
urls = get_urls(sf, wm, em)
urls.each do |url|
url_queue.publish(url.to_json)
end
puts " [x] Queued #{urls.size} urls for #{em}"
users_channel.ack(delivery_info.delivery_tag)
root@ubuntu14:~# go build -o pwdgen.exe pwdgen_linux.go
Segmentation fault (core dumped)
root@ubuntu14:~# uname -a
Linux ubuntu14 3.13.0 BrandZ virtual linux i686 i686 i686 GNU/Linux
require 'awesome_print'
require 'aws-sdk-core'
ec2 = Aws.ec2
subnets = []
ec2.describe_subnets.subnets.each { |s| subnets << s }
list = subnets.each_with_object({}) { |s,h| h[s.subnet_id] = s.cidr_block}
list.each do |subnet, cidr|
table <vhost1> { 10.20.30.40 10.20.30.50 }
table <vhost2> { 10.20.30.60 10.20.30.70 }
http protocol "vhosts" {
match request quick header "Host" value "vhost1.test.com" forward to <vhost1>
match request quick header "Host" value "vhost2.test.com" forward to <vhost2>
}
relay "vhosts" {
@Atalanta
Atalanta / gist:57b985a9f17765ff8955
Created February 18, 2015 11:44
Setting up keyboard on OpenBSD
wsconsctl keyboard.encoding=uk
wsconsctl keyboard.map+="keysym Caps_Lock = Control_L"
@Atalanta
Atalanta / gist:386247eff1645a4269f2
Last active August 29, 2015 14:14
What to do with a new mac
- Install Chef
- Set the background to a plain dark colour
- Move the dock to the left
- Configure the dock to hide, large, no mag
@Atalanta
Atalanta / gist:7495888147705618cffe
Last active August 29, 2015 14:13
Maths Books and Reading Lists
## Books
* The Man Who Knew Infinity, Robert Kanigel
* Gödel, Escher, Bach, Douglas Hofstadter
* The Colossal Book of Mathematics, Martin Gardner
* Euclid in the Rainforest, Joseph Mazur
* Four Colours Suffice, Robin Wilson
* What is Mathematics Really?, Reuben Hersh
* Magical Mathematics, Persi Diaconis and Ron Graham
* Games of Life, Karl Sigmund
@Atalanta
Atalanta / gist:a07b0ac71ac407ceaaa0
Created January 3, 2015 10:05
Initial Spec for SNS Workstation

PCPartPicker part list / Price breakdown by merchant

Type Item Price
CPU Intel Core i7-4790 3.6GHz Quad-Core Processor £233.94 @ Scan.co.uk
CPU Cooler Deepcool GAMMAXX 400 66.3 CFM CPU Cooler £29.69 @ Amazon UK
Motherboard Asus Z97-P ATX LGA1150 Motherboard £69.56 @ Scan.co.uk
Memory Crucial Ballistix 8GB (1 x 8GB) DDR3-1866 Memory £65.40 @ Amazon UK
Memory Crucial Ballistix 8GB (1 x 8GB) DDR3-1866 Memory £65.40 @ Amazon UK
Memory [Crucial Ballistix 8GB (1 x 8GB) DDR3-1866 Memory](http://uk.pcpartpicker.com/part/crucial-memory-blt8g3d1869d
@Atalanta
Atalanta / gist:9f3c57205e3ecbb6ad30
Created December 19, 2014 13:43
Spelt Flatbread

This will make about 8 flatbreads. Put anything you like on them.

Ingredients

  • Roughly 270g spelt flour
  • Roughly 180ml nearly boiling water
  • Half a teaspoon of finely ground sea salt
  • Half a teaspoon of bicarbonate of soda
  • A tablespoon of olive oil