Skip to content

Instantly share code, notes, and snippets.

View KristianLyng's full-sized avatar

Kristian Lyngstøl KristianLyng

  • Amedia
  • Oslo
View GitHub Profile
host: ec2-107-22-111-142.compute-1.amazonaws.com root pw: Tishri coal Norths seaman
host: ec2-50-19-38-208.compute-1.amazonaws.com root pw: rooms Iraq lacy solver
host: ec2-50-17-151-188.compute-1.amazonaws.com root pw: Bahia gayer wharf helm
host: ec2-23-20-181-146.compute-1.amazonaws.com root pw: laurel Kelly Olivia flings
host: ec2-23-20-171-103.compute-1.amazonaws.com root pw: tiller Cretan tarots Bataan
host: ec2-50-19-151-123.compute-1.amazonaws.com root pw: uvular spasm titled Tami
kristian@freud:~/.../ninjahosting/chef-repo$ knife status
30 minutes ago, laika.superheroes.no, debian 6.0.4, laika.superheroes.no, 178.255.149.151
29 minutes ago, jupiter.bakabo.net, debian 6.0.4, jupiter.bakabo.net, 178.255.149.132
28 minutes ago, eris.oemparts.no, debian 6.0.4, eris.oemparts.no, 178.255.149.148
28 minutes ago, namaka.curato.no, debian 6.0.4, namaka.curato.no, 178.255.149.144
28 minutes ago, ganymede.bakabo.net, debian 6.0.4, ganymede.bakabo.net, 178.79.177.39
26 minutes ago, deimos.drupal.no, debian 6.0.4, deimos.drupal.no, 178.255.149.154
24 minutes ago, phobos.drupal.no, debian 6.0.4, phobos.drupal.no, 178.255.149.153
23 minutes ago, halley.bedreskatt.no, debian 6.0.4, halley.bedreskatt.no, 178.255.149.135
#!/bin/sh
# Simply lists all IPs currently in the chef-setup in a sorted manner
knife status | gawk -v FS="," -v f=0 '
{
if (f == 0) {
for (a=1; a<=NF; a++) {
if ($a ~ /[0-9][0-9]+\.[0-9]+/) {
f = a;
Host: ec2-23-20-137-13.compute-1.amazonaws.com Root pw: Canton flukes takes dally
Host: ec2-107-21-169-245.compute-1.amazonaws.com Root pw: bowing rends worm Louise
Host: ec2-107-20-104-49.compute-1.amazonaws.com Root pw: Xerox Munch sates aye
Host: ec2-23-20-129-25.compute-1.amazonaws.com Root pw: slaw flogs unplug blank
Host: ec2-107-21-165-200.compute-1.amazonaws.com Root pw: caret comb grime rawer
Host: ec2-23-20-18-78.compute-1.amazonaws.com Root pw: trays kenned bears dogie
Host: ec2-107-22-34-82.compute-1.amazonaws.com Root pw: down laud tomes tiptop
Host: ec2-50-17-115-136.compute-1.amazonaws.com Root pw: toques wagers Anubis oat
Host: ec2-23-20-127-131.compute-1.amazonaws.com Root pw: scamps shapes grays tolled
Host: ec2-107-20-34-149.compute-1.amazonaws.com Root pw: homes piker Sumter inked
Host: ec2-23-20-33-232.compute-1.amazonaws.com Root pw: scenes mirage Hunt Jews
Host: ec2-184-72-144-89.compute-1.amazonaws.com Root pw: lend Elsa twine cagingh
13:47 -!- Irssi: Connection to irc.efnet.org established
13:47 !irc.efnet.org *** Processing connection to irc.umich.edu
13:47 !irc.efnet.org *** Looking up your hostname...
13:47 !irc.efnet.org *** Checking Ident
13:47 !irc.efnet.org *** Found your hostname
13:48 !irc.efnet.org *** No Ident response
13:48 !irc.umich.edu To complete your connection to this server, type "/QUOTE PONG :cookie", where cookie is the following
ascii.
13:48 -!- __ __ _____ _____ ______ _____
13:48 -!- /\ \ \ / /| __ \ | __ \ | ____||_ _|
kristian@luke:~$ ipmitool -I lanplus -U kristian -H 178.255.146.35 -E sol activate
[SOL Session operational. Use ~? for help]
Debian GNU/Linux 6.0 tellus ttyS2
tellus login: root
Password:
Last login: Sat Feb 11 15:49:51 EST 2012 on ttyS2
Welcome
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
int
main(void)
@KristianLyng
KristianLyng / gist:1423630
Created December 2, 2011 15:25
Cookie-Counter
kristian@odd:~$ varnishlog -d -k 100000 -O -i RxHeader -I Cookie -X Set-Cookie -u | sed 's/=[^;]*\(;\|$\)//g' -u | cut -b30- | awk '{for(i=1;i<NF;i++) { foo[$i]++ } } END{for (var in foo) { print var ":" foo[var]; } }'
PHPSESSID:1
ASPSESSIONIDSSBDDCAC:1
BCSI-CS-27C15425D9E30835:20
TG5H_fff8_saltkey:1
__utmz:49
TG5H_fff8_lastvisit:1
__utma:349
__utmb:238
__utmc:265
@KristianLyng
KristianLyng / gist:1404599
Created November 29, 2011 12:10
VCL state diagram
.-----------------.
.----------| receive request |
v '-----------------'
.--------------.
| vcl_recv | Varnish 3.0 state diagram
.-----------|--------------|-------------. Not entierly complete.
| | req | | Misses error/restart and
v '--------------' v some internals
pass lookup pipe
| | |