Skip to content

Instantly share code, notes, and snippets.

Matthew Watts mwatts272

Block or report user

Report or block mwatts272

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
@mwatts272
mwatts272 / install-bash
Created Nov 2, 2013
Upgrading the rather risqué bash on Mac OS X. Please Note: Homebrew installs things to /usr/local/Cellar/, then symlinks any binaries to /usr/local/bin, so you've now got the latest bash sitting at /usr/local/bin/bash, just so you know.
View install-bash
# Install Homebrew.
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
# Update Homebrew's formulae.
brew update
# Install GIT using homebrew
brew install git
# Install bash
@mwatts272
mwatts272 / obtainIPFromHost
Created Oct 10, 2013
Obtain the IP Address from a domain name.
View obtainIPFromHost
host mwatts.it | head -1 | awk '{print $4}'
@mwatts272
mwatts272 / stringSearch
Created Oct 10, 2013
Search (grep) for a specified string in all files within the given directory. Highlights all matches in colour.
View stringSearch
grep --color -R "search term" /target/dir/
@mwatts272
mwatts272 / readStoreRemoteFile
Created Oct 10, 2013
Obtain and output (stdout) via the ssh daemon (sshd) the contents of the desired file - not explicitly a log file.
View readStoreRemoteFile
ssh username@hostname "tail -f /var/www/fbi.gov/logs/classifiedAccess.log" | tee /loacl/storage/path
@mwatts272
mwatts272 / certDebug.sh
Created Oct 10, 2013
TLS Cert debugging with open ssl
View certDebug.sh
openssl s_client -connect mwatts.it:443 -prexit
@mwatts272
mwatts272 / GnuPG
Last active Dec 22, 2015
A collection of the most commonly used GnuPG Commands.
View GnuPG
###########################
##### Generating Keys #####
###########################
## Generate a key. Follow the options and your good to go. Just make sure your on your Jack Jones!
gpg --gen-key
###############################
##### Importing your keys #####
###############################
@mwatts272
mwatts272 / sublime-dev
Created Aug 27, 2013
Install Sublime Dev
View sublime-dev
apt-get install python-software-properties
add-apt-repository ppa:webupd8team/sublime-text-2
apt-get update
apt-get install sublime-text-dev
View gist:6196570
## Check https://mwatts.it/articles/stallingUnix.txt for description
mkdir reverberate && cd reverberate
source /home/mwatts/resonate
% source resonate
@mwatts272
mwatts272 / scapy-traceroute.py
Last active Dec 20, 2015
A sharp trace-route tool built with scapy for testing the routes of multiple domains.
View scapy-traceroute.py
#! /usr/bin/env python
# Set log level to benefit from Scapy warnings
import logging
logging.getLogger("scapy").setLevel(1)
from scapy.all import *
if __name__ == "__main__":
hosts = raw_input('Hostnames you would like to traceroute sepearated by a comma: ')
@mwatts272
mwatts272 / getUserGeographicDataFromIP.py
Last active Dec 17, 2015
An easy means of getting a Users Geographic Data based from their Internet Protocol Address. Please Note: Please only use your public IP Address, and not your routers self assigned IP Address.
View getUserGeographicDataFromIP.py
#!/usr/bin/env python
"""
Retrieves Geographic Information (Location) of a specified IP Address
"""
import urllib
ipAddress = '50.57.97.17'
response = urllib.urlopen('http://www.geoplugin.net/json.gp?ip={0}' .format(ipAddress)).read()
You can’t perform that action at this time.