This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.git/ | |
.hg/ | |
images/ | |
img/ | |
tmp/ | |
*.tags* | |
*.tmp* | |
*.old | |
*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex index.php | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^(.*)$ index.php?/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from smtplib import SMTP | |
from email.MIMEText import MIMEText | |
SERVER = "<SMTP_server>" | |
USERNAME = "<SMTP_user_name>" | |
PASSWORD = "<SMTP_password>" | |
DESTINATION = "<destination_email_address>" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Instagram Auth Test</title> | |
</head> | |
<body> | |
<h1>Instagram Auth Test</h1> | |
<?php | |
// Register your app here: http://instagram.com/developer/ | |
$client_id = 'YOUR_CLIENT_ID'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# install .bash_profile | |
curl https://raw.githubusercontent.com/AaronTraas/osx-setup/master/bash_profile > ~/.bash_profile | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install caskroom | |
brew tap phinze/cask && brew install brew-cask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// My modifications to mailer script from: | |
// http://blog.teamtreehouse.com/create-ajax-contact-form | |
// Added input sanitizing to prevent injection | |
// Only process POST reqeusts. | |
if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
// Get the form fields and remove whitespace. | |
$name = strip_tags(trim($_POST["name"])); | |
$name = str_replace(array("\r","\n"),array(" "," "),$name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
# Precondition: list is a list of numbers | |
def is_ordered(list): | |
last = None | |
for el in list: | |
if last is not None and el < last: | |
return False | |
last = el | |
return True |