Skip to content

Instantly share code, notes, and snippets.

View numberwhun's full-sized avatar

Jefferson Kirkland numberwhun

View GitHub Profile
@numberwhun
numberwhun / 403forbidden.php
Created November 28, 2011 11:53
Creating a Secure PHP Login Script
<?php
header('HTTP/1.1 403 Forbidden');
?>
<html>
<head>
<title>Congratulations! You have been DENIED access</title>
</head>
<body>
<font size="4">You have been denied access because of the following reasons:<br /><br />
1.) Too many failed login attempts, so you are likely brute forcing through logins.<br />
@numberwhun
numberwhun / promptcolor
Created September 14, 2011 08:35 — forked from jtmkrueger/promptcolor
color your prompt and show git branch
#color and git branch
parse_git_branch() {··
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export CLICOLOR=1
export GREP_OPTIONS="--color"
export LSCOLORS=gxfxcxdxbxegedabagacad
PS1='\n\[\e[1;36m\]\w \[\e[m\]\[\e[1;33m\]$(parse_git_branch)\[\e[m\] \n> '
@numberwhun
numberwhun / classes.rb
Created August 22, 2011 06:19 — forked from jbrechtel/classes.rb
Ruby classes
#simple class
class Person
end
#inheritance
class Sarah < Person
end
#class with constructor arguments
class Jet
@numberwhun
numberwhun / setup-workstation.sh
Last active August 29, 2015 14:26 — forked from igniteflow/setup-workstation.sh
Set up a new box from a fresh Xubuntu install
#!/bin/bash
NAME=Phil Tysoe
EMAIL=philtysoe@example.com
SUBLIME_TEXT_2_DOWNLOAD_URL=http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2
ECLIPSE_DOWNLOAD_URL=http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops4/R-4.2.2-201302041200/eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
# setup ssh key
ssh-keygen -t rsa -C "${EMAIL}"
cat ~/.ssh/id_rsa.pub