Skip to content

Instantly share code, notes, and snippets.

View 0x00b1's full-sized avatar
🕶️

Allen Goodman 0x00b1

🕶️
View GitHub Profile
@0x00b1
0x00b1 / ubuntu-nginx-init.sh
Created August 28, 2012 05:07
nginx Initialization for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# 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
% java PercolationStats 2 10000
mean = 0.666925
stddev = 0.11776536521033558
95% confidence interval = 0.6646167988418774, 0.6692332011581226
mean = 0.665575
stddev = 0.11823733497392995
95% confidence interval = 0.663257548234511, 0.6678924517654891
if [[ !(`date | grep NZDT`) ]]; then
sudo ln -sf /usr/share/zoneinfo/Pacific/Auckland /etc/localtime
fi
sudo apt-get update
sudo apt-get --yes upgrade
sudo sed -i 's/#PasswordAuthentication no/PasswordAuthentication no/g' /etc/ssh/sshd_config
sudo sed -i 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config
sudo service ssh restart
grammar Grammar;
fragment Uppercase : [A-Z] | '$' | '_' ;
fragment Lowercase : [a-z] ;
fragment Letter : Uppercase | Lowercase ;
fragment Operator : [\u0020-\u007F]+ ;
fragment Body : (Letter | [0-9])* ('_' Operator) ;
fragment Decimal : '0' | [1-9] [0-9]* ;
fragment Hexadecimal : '0' 'x' [0-9A-Fa-f]+ ;
fragment Octal : '0' [0-7]+ ;
@0x00b1
0x00b1 / gist:5409198
Last active December 16, 2015 08:58
\documentclass{standalone}
\usepackage{standalone}
\usepackage{tikz}
\newcommand { \U } { (-2, -2) rectangle ( 3, 2) (-2, 2) }
\newcommand { \A } { ( 0, 0) circle ( 1) ( 0, 1) }
\newcommand { \B } { ( 1, 0) circle ( 1) ( 1, 1) }
\newcommand { \venn } {

Add all the natural numbers below 1000 that are multiples of 3 or 5.

ℕ = { 1, 2, 3, … }

A = { x ∈ ℕ : x < 1000 }

B = { y ∈ A : 3 | y ⋃ 5 | y }

∑ B

// Write a C function whose return value is an integer between one and five:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int sample(int minimum, int maximum)
{
int random = rand();
Allens-MacBook-Air:~ allen$ uname -a
Darwin Allens-MacBook-Air.local 13.0.0 Darwin Kernel Version 13.0.0: Sat Jun 1 01:13:40 PDT 2013; root:xnu-2422.1.4.1.8~1/RELEASE_X86_64 x86_64
Allens-MacBook-Air:~ allen$ /usr/bin/emacs --version
GNU Emacs 22.1.1
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
We can't make this file beautiful and searchable because it's too large.
Date,Open,High,Low,Close,Volume,Adj Close
2013-01-28,204.85,206.22,204.29,204.93,2823700,201.03
2013-01-25,204.45,205.18,204.13,204.97,3358900,201.07
2013-01-24,203.91,205.06,203.08,204.42,4447200,200.53
2013-01-23,203.50,208.58,203.36,204.72,12530500,200.82
2013-01-22,194.36,196.08,194.01,196.08,7172300,192.35
2013-01-18,194.03,195.00,193.80,194.47,4559600,190.77
2013-01-17,193.85,194.46,193.24,193.65,3881600,189.96
2013-01-16,192.00,193.18,191.35,192.59,2962900,188.92
2013-01-15,191.31,192.73,190.39,192.50,4172100,188.84

Keybase proof

I hereby claim:

  • I am goodmanio on github.
  • I am goodman (https://keybase.io/goodman) on keybase.
  • I have a public key whose fingerprint is 195F 27B9 4919 E22B C9D9 1823 2AC9 2307 2763 6EC1

To claim this, I am signing this object: