Skip to content

Instantly share code, notes, and snippets.

View huebs's full-sized avatar
:octocat:
Hacking into the Mainframe

Ben Huebscher huebs

:octocat:
Hacking into the Mainframe
View GitHub Profile
@huebs
huebs / RateLimiter.php
Last active June 3, 2016 12:43
Simple implementation of a rate limiter in PHP.
<?php
/**
* @author Ben Huebscher <ben@hubtech.tv>
*/
class RateLimiter
{
/**
* @var int
*/
@huebs
huebs / 0_reuse_code.js
Created October 15, 2015 15:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@huebs
huebs / fixweb.sh
Created June 16, 2015 23:30
Grant Apache User R/W Access for the CWD and Its Subdirectories
sudo chmod -R +a "$(ps axo user,group,comm | egrep '(apache|httpd)' | grep -v ^root | uniq | cut -d\ -f 1) allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity" .
@huebs
huebs / Brewfile
Created May 14, 2015 03:26
The Brewfile I use to set up a new computer.
# Tap Kegs
tap caskroom/cask
tap homebrew/dupes
tap homebrew/php
# Install MySQL
install mysql
@huebs
huebs / osx-dev-setup.sh
Last active August 29, 2015 14:05
This is the file to run on a clean install of Mac OS X to install a variety of development tools.
#!/bin/sh
################################################################################
##
## Title: Mac OS X Setup Script
## Description: This is the file to run on a clean install of Mac OS X to
## install a variety of development tools.
## Revison: 4
## Last Updated: Wednesday, October 22, 2014
## Author: Ben Huebscher <ben@hubtech.tv>
##
@huebs
huebs / .profile
Last active December 28, 2015 23:19
The bash .profile I use for OS X development. Some commands require Homebrew, Node.js, and/or Heroku Toolbelt. Should only be used as an example.
################################################################################
##
## Title: Mac OS X Bash Profile
## Description: The bash .profile I use for OS X development. Some commands
## require Homebrew and Node. Should only be used as an example.
## Revison: 23
## Last Updated: Thursday, February 12, 2015
## Author: Ben Huebscher <ben@hubtech.tv>
##