Skip to content

Instantly share code, notes, and snippets.

View jacobbridges's full-sized avatar
🪐
Looking for it..

Jacob Bridges jacobbridges

🪐
Looking for it..
View GitHub Profile
@jacobbridges
jacobbridges / analyze.py
Last active August 29, 2015 14:12
Obama Speech Text Analysis
import re
from collections import Counter
SPEECH_TO_PROCESS = "Year End Press Conference -- (12-19-2014).txt"
# Open speech document
with open(SPEECH_TO_PROCESS, "r") as SPEECH_FILE:
# Read speech text into variable, converting any pesky unicode characters
speech = SPEECH_FILE.read().decode('utf8').encode("ascii", "ignore")
@jacobbridges
jacobbridges / find_open_ports.sh
Created November 6, 2014 20:05
Ubuntu find all busy ports
netstat -ntlp | grep LISTEN
@jacobbridges
jacobbridges / Track-PHP-Execution-Time.php
Last active August 29, 2015 14:08
Track PHP Execution Time
<?php
// The 'microtime' code can be included in any method or application to track the script run time.
function test()
{
// Get the (negative) current UNIX timestamp in milliseconds
$time = -microtime(true);
// Run some code
$hash = 0;