Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
# Easily calculate mean and standard distribution of a distribution without
# collecting all values in memory
#
class Distribution
def initialize
@n, @sum_x, @sum_x_2 = 0, 0, 0
@min, @max = nil, nil
end
def <<(x)
blkfront: xvdd: barriers enabled
xvdd: unknown partition table
XENBUS: Device with no driver: device/console/0
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
EXT3-fs: barriers not enabled
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JSON Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script>
Jan 12 15:01:48 lb02 kernel: [88879.477199] Free swap = 917496kB
Jan 12 15:01:48 lb02 kernel: [88879.477201] Total swap = 917496kB
Jan 12 15:01:48 lb02 kernel: [88879.481930] 447488 pages RAM
Jan 12 15:01:48 lb02 kernel: [88879.481933] 263682 pages HighMem
Jan 12 15:01:48 lb02 kernel: [88879.481935] 10460 pages reserved
Jan 12 15:01:48 lb02 kernel: [88879.481936] 11249 pages shared
Jan 12 15:01:48 lb02 kernel: [88879.481937] 329651 pages non-shared
Jan 12 15:01:48 lb02 kernel: [88879.502144] rsyslogd invoked oom-killer: gfp_mask=0xd0, order=1, oom_adj=0
Jan 12 15:01:48 lb02 kernel: [88879.502149] rsyslogd cpuset=/ mems_allowed=0
Jan 12 15:01:48 lb02 kernel: [88879.502153] Pid: 23973, comm: rsyslogd Not tainted 2.6.32-309-ec2 #18-Ubuntu
[info] [<0.125.0>] 127.0.0.1 - - 'GET' /versioned-projects-development/ping 404
[info] [<0.138.0>] 127.0.0.1 - - 'GET' /_uuids?count=1000 200
[info] [<0.163.0>] 127.0.0.1 - - 'PUT' /versioned-projects-development/d6b1b8c10fc3a5ccd602c74eeb1ea9e6 201
[error] [<0.140.0>] ** Generic server <0.140.0> terminating
** Last message in was {pread_iolist,87833962}
** When Server state == {file,{file_descriptor,prim_file,{#Port<0.2101>,13}},
87811362,87834182}
** Reason for termination ==
** {{badmatch,{ok,<<50,84,49,48,58,51,55,58,51,51,90,104,2,109,0,0,0,10,117,
112,100,97,116,101,100,95,97,116,109,0,0,0,20,50,48,49,
require 'set'
require 'matrix'
class OllyPlayer
BoardSize = 10
Infinity = (1.0/0)
class Board
def initialize(current_state, ships_remaining)
row = Array.new(BoardSize, 0)
@olly
olly / olly.theme
Created November 15, 2011 10:52
My ZSH Theme
# ------------------------------------------------------------------------------
# FILE: olly.zsh-theme
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Olly Legg (olly@51degrees.net)
# ------------------------------------------------------------------------------
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
if [ "$SSH_CONNECTION" ]; then
HOSTNAME="%{$fg_bold[red]%}%n@%m %{$reset_color%}"
@olly
olly / dmesg.boot
Created June 5, 2012 12:31
/var/run/dmesg.boot
pci6: <ACPI PCI bus> on pcib6
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfe502000-0xfe5023ff irq 23 at device 29.0 on pci0
ehci1: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <EHCI (generic) USB 2.0 controller> on ehci1
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel Cougar Point SATA300 controller> port 0xf0b0-0xf0b7,0xf0a0-0xf0a3,0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f mem 0xfe501000-0xfe5017ff irq 20 at device 31.2 on pci0
atapci0: [ITHREAD]
atapci0: AHCI called from vendor specific driver
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/Olly/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-46-51-151-203.eu-west-1.compute.amazonaws.com [46.51.151.203] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'