Skip to content

Instantly share code, notes, and snippets.

View nroberson's full-sized avatar
🔳

Nolan Roberson nroberson

🔳
View GitHub Profile
@nroberson
nroberson / print_geo_info.py
Created October 19, 2014 06:23
Print your public ip geo info periodically
import json
import urllib2
import time
GET_IP_URI = 'https://freegeoip.net/json'
SLEEP_TIME_S = 25 * 60
def get_geo_json():
content = urllib2.urlopen(GET_IP_URI).read()
@nroberson
nroberson / Bash-ShellShock-Test.txt
Created October 15, 2014 02:03
Bash ShellShock Test
Test if your system is vulnerable,
$ env X="() { :;}; echo shellshock" `which bash` -c "echo completed"
shellshock
completed
If you got “shellshock” in output then it is vulnerable.

Keybase proof

I hereby claim:

  • I am nroberson on github.
  • I am nolan (https://keybase.io/nolan) on keybase.
  • I have a public key ASArOwQvbpk59BHKL1_tRkw7oN0U4PixZfbb6IbQ1V3BoAo

To claim this, I am signing this object:

@nroberson
nroberson / proper-archive.sh
Created May 15, 2014 14:26
Xcode run script that allows an app that also includes static libraries to be archived properly.
#!/bin/sh
echo "Removing by-products (that prevent proper archiving)"
echo "$INSTALL_ROOT/Headers"
echo "$INSTALL_ROOT/PrivateHeaders"
rm -fr "$INSTALL_ROOT/usr";
if [ "$INSTALL_ROOT/Headers" != "/Headers" ]; then
rm -fr "$INSTALL_ROOT/Headers";
@nroberson
nroberson / debuglog.pch
Created April 16, 2014 03:34
Objective-C Debug Log Defines
#ifndef NDEBUG
# define DLOG(format, ...) NSLog((@":NR: %s (L: %d) " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
# define DLOG(...)
#endif
@nroberson
nroberson / ddclient.conf
Created September 12, 2013 02:20
A simple ddclient.conf to use with namecheap.com
# /etc/ddclient.conf
daemon=1800 # Check every 30 minutes
syslog=yes # log messages to syslog
pid=/var/run/ddclient.pid # record the pid
ssl=yes # use ssl
## Obtain ip address from dyndns' ip checker. make sure check interval is greater than 600
## otherwise dyndns may block you.
@nroberson
nroberson / clean_remote.sh
Created September 6, 2013 21:31
Delete's all remote branches from origin
git branch -r | sed 's/origin\///g' | xargs -n 1 git push --delete origin
@nroberson
nroberson / hack.sh
Created March 31, 2012 17:32 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#