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
alexjs / ideal ops.md
Created May 27, 2012 — forked from bhenerey/ideal ops.md
ideal ops checklist
View ideal ops.md

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

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@alexjs
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 https://gist.github.com/1064640/ 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
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
host=${match[-2]}
path=${match[-1]}
/usr/bin/ssh -t $host "cd ${path} && exec ${SHELL}"
else
/usr/bin/ssh $*
fi
}
View keybase.md

Keybase proof

I hereby claim:

  • I am alexjs on github.
  • I am alexjs (https://keybase.io/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
<?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": [
"ec2:AttachVolume",
"ec2:CreateVolume",
"ec2:DescribeVolumes"
View fsjitter.sh
#!/bin/bash
############
# Config options here.
# Please also remember to set an IAM role on the instance in question
# Sample policy for that role: https://gist.github.com/5bb67c1e6bfe7aedc691a722a57055f2
############
mountPoint="/opt/myAppName/var/run"
devicePoint="xvdz" # We start from the top down rather than bottom up to avoid conflicts
You can’t perform that action at this time.