Skip to content

Instantly share code, notes, and snippets.

:octocat:
contributing

Christopher Hopper christopher-hopper

:octocat:
contributing
Block or report user

Report or block christopher-hopper

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
@eporama
eporama / phpenv-osx.sh
Last active Oct 14, 2017 — forked from webbj74/phpenv-osx.sh
Setup multiple versions of PHP on OSX using homebrew
View phpenv-osx.sh
#!/usr/bin/env bash
# Use this script to install or re-install multiple versions of PHP
# You should be able to re-run the script multiple times; it will update/reinstall what it needs.
# Check OS
if [ "${OSTYPE//[0-9.]/}" != "darwin" ]; then
echo "This script is intended for OSX users."
exit
@graceavery
graceavery / harryPotterAliases
Last active Oct 11, 2019
bash aliases for Harry Potter enthusiasts
View harryPotterAliases
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
@tristan0x
tristan0x / README.md
Last active Aug 7, 2017
Git commit client hook
View README.md

Git commit client hook

Provides Git hook enforcing commit message.

  • first line length must be less than 50 characters.
  • if applicable, second line may be empty.
  • length of every lines may be less than 72 characters.

Installation instructions

@DavidHernandez
DavidHernandez / d7-autologin.php
Created Oct 16, 2014
This is another PoC for the SA-CORE-2014-005 vulnerability. Instead of updating the users table, activates an anonymous session to change your session into admin.
View d7-autologin.php
<?php
/**
* D7 autologin.
* Exploits SA-CORE-2014-005 to change your anonymous session into an uid 1 session.
* In order to work, first you need to have an anonymous session in the sessions table.
* One way to achieve this is to go to the update.php page.
*
* Usage: php d7-autologin.php http://example.com 127.0.0.1
*
@henriquemoody
henriquemoody / phpunit.bash
Last active Mar 31, 2016
PHPUnit Bash Completion. sudo curl -L https://gist.githubusercontent.com/henriquemoody/5014805/raw/phpunit.bash -o /etc/bash_completion.d/phpunit && source /etc/bash_completion.d/phpunit
View phpunit.bash
# Bash-Completion script for PHPUnit
#
# Created by Henrique Moody <henriquemoody@gmail.com>
#
_phpunit()
{
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
You can’t perform that action at this time.