Skip to content

Instantly share code, notes, and snippets.

ifightcrime / Dockerfile
Created Aug 6, 2017 — forked from yefim/Dockerfile
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
View Dockerfile
# Example Dockerfile
FROM hello-world
View gist:9b2b5a4d28e76c12d9892223cf22de7a

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

ifightcrime / values_pointers.go
Created Apr 5, 2016 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
View values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
Also available at:
p := Person{"Hillary", 28} stores the value
ifightcrime / .bashrc
Created Mar 19, 2016 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
View .bashrc
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
ifightcrime /
Created Feb 14, 2016 — forked from solusipse/
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.


  1. Run script.
  2. Configure postgres to allow connections.
  3. Configure postfix admin. Remember to set these:
ifightcrime / hashquiz.rb
Last active Aug 29, 2015 — forked from potatosalad/hashquiz.rb
Ruby quiz for convert hash "dot paths" into actual hash hierarchy.
View hashquiz.rb
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
ifightcrime / 0_reuse_code.js
Created Mar 21, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Splunk Storm
$ wget [ Download Splunk url ]
$ gunzip -c splunkforwarder-5.0-140868-Linux-x86_64.tgz | tar -xvpf -
$ ./splunkforwarder/bin/splunk start
$ ./splunkforwarder/bin/splunk install app stormforwarder_3de50bc823a711e2b4a81231390e9c34.spl -auth admin:changeme
$ ./splunkforwarder/bin/splunk login -auth admin:changeme
$ ./splunkforwarder/bin/splunk edit user admin -password whatever_you_want
$ ./splunkforwarder/bin/splunk add forward-server
$ ./splunkforwarder/bin/splunk add monitor /var/www/monologapp/log/fideloper.log # Starts sending data
$ ./splunkforwarder/bin/splunk add monitor /var/log/apache2/error.log
ifightcrime / LICENSE.txt
Created Sep 29, 2011 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
View LICENSE.txt
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
ifightcrime / routes.rb
Created Jul 13, 2011 — forked from pixeltrix/routes.rb
Examples of advanced Rails 3.0 routes
View routes.rb
Rails.application.routes.draw do
get '/(:locale)/products/(:category)/(page/:page).:extension',
:to => 'products#index',
:as => :products,
:constraints => {
:locale => /[a-z]{2}/,
:category => /.+?/,
:page => /\d+/