This file contains hidden or 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 | |
show_usage(){ | |
echo "Usage: airplanemode on|off" | |
} | |
case $1 in | |
"-h"|"--help") show_usage; exit 1; ;; | |
esac |
This file contains hidden or 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/env python | |
import sys | |
files = [] | |
if len(sys.argv) > 2: | |
for file in sys.argv[1:]: | |
files.append(str(file)) | |
else: | |
print "Usage: Wordcount.py file1 file2 file3 ..." |
This file contains hidden or 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 | |
import urllib | |
import urllib2 | |
import re | |
wordlists = ["/path/to/your/wordlist.txt"] | |
def regex(txt): | |
re1='.*?' # Non-greedy match on filler | |
re2='(\\d+)' # Integer Number 1 |
This file contains hidden or 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/env python | |
""" | |
Yasyf Mohamedali (http://www.yasyf.com) | |
First published at https://gist.github.com/yasyf/5299301 | |
A quick python script to solve the math riddle involving an insurance broker and a woman's daughters. | |
This script will take a variable amount of daughters, whose ages multiply to any number, and present you with all possible solutions, if any. | |
Quickstart: | |
To run, save the script, make sure you have python installed, and simply run the following from the command line: |
This file contains hidden or 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 | |
// Database variables | |
$host = "localhost"; //database location | |
$user = ""; //database username | |
$pass = ""; //database password | |
$db_name = ""; //database name | |
// PayPal settings | |
$paypal_email = ''; | |
$return_url = ''; |
This file contains hidden or 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/env python | |
import math,os,sys | |
def clear(): | |
os.system('cls' if os.name=='nt' else 'clear') | |
def init(): | |
clear() | |
print "Pascale's Triangle\n" |
This file contains hidden or 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/env python | |
import sys, os, requests, json, random | |
from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol (port 465, uses SSL) | |
#from smtplib import SMTP | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
SMTPserver = '' |
This file contains hidden or 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/env python | |
import math,os,sys | |
def clear(): | |
os.system('cls' if os.name=='nt' else 'clear') | |
def init(): | |
clear() | |
print "Binomial Theorem\n" |
This file contains hidden or 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/env python | |
import sys,re | |
sqbraces='(\\[.*?\\])' # Square Braces | |
regex = re.compile(sqbraces,re.IGNORECASE|re.DOTALL) | |
input = sys.argv[1] | |
printname = True |
This file contains hidden or 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/env python | |
notes_dict = {"c": "119","c#": "110", "db": "110", "d": "105", "d#": "100", "eb": "100", "e": "94", "f": "89", "f#": "84", "gb": "84", "g": "79", "g#": "74", "ab": "74", "a": "70", "a#": "66", "bb": "66", "b": "62", "c2": "59"} | |
notes_string = raw_input("Enter Notes (Delimited By Spaces): ") | |
notes = notes_string.split(" ") | |
print "to song" | |
for note in notes: | |
if note in notes_dict: | |
print " note %s 5" % (notes_dict.get(note)) | |
print "end" |