Skip to content

Instantly share code, notes, and snippets.

Alex Smith alexjs

Block or report user

Report or block alexjs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alexjs / ideal
Created May 27, 2012 — forked from bhenerey/ideal
ideal ops checklist
View ideal

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:


  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

alexjs / cors-nginx.conf
Created Nov 28, 2012 — forked from michiel/cors-nginx.conf
Slightly tighter CORS config for nginx
View cors-nginx.conf
# Slightly tighter CORS config for nginx
# A modification of to include a white-list of URLs
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
alexjs / .zsh-ssh-hack
Created Apr 3, 2013
zsh function to allow ssh'ing direct to a directory
View .zsh-ssh-hack
ssh() {
# If we specify host:dir, ssh straight to that dir
if [[ $1 =~ "(.*):(.*)" ]]; then
/usr/bin/ssh -t $host "cd ${path} && exec ${SHELL}"
/usr/bin/ssh $*

Keybase proof

I hereby claim:

  • I am alexjs on github.
  • I am alexjs ( on keybase.
  • I have a public key whose fingerprint is 2C10 A549 3194 0748 E94B 2F63 9F68 2FA8 D2AC 17FE

To claim this, I am signing this object:

View header_dump.php
# Set a no-cache header header
header('Cache-Control: max-age=0');
echo "REMOTE_ADDR: ". $_SERVER['REMOTE_ADDR'] . "<br>";
$output .= "REMOTE_ADDR: ". $_SERVER['REMOTE_ADDR']."\n";
foreach (getallheaders() as $name => $value) {
echo "$name: $value<br>";
$output .="$name: $value\n";
View apache_rewrite.conf
RewriteEngine On
RewriteCond %{HTTP:X-PSK-Auth} !^e6e59c8c1dcca46fde36bf43b84487d8$
RewriteRule .* - [F]
View fsjitter-policy.json
"Version": "2012-10-17",
"Statement": [
"Sid": "Stmt1477726821000",
"Effect": "Allow",
"Action": [
# Config options here.
# Please also remember to set an IAM role on the instance in question
# Sample policy for that role:
devicePoint="xvdz" # We start from the top down rather than bottom up to avoid conflicts
You can’t perform that action at this time.