Skip to content

Instantly share code, notes, and snippets.

View samhunta's full-sized avatar
:octocat:
Software Developer

samhunta

:octocat:
Software Developer
View GitHub Profile

Keybase proof

I hereby claim:

  • I am samhunta on github.
  • I am sudovenice (https://keybase.io/sudovenice) on keybase.
  • I have a public key ASCyMfucKhDQkD8rBRbs-DDsNVqO3xpGhe5eLW6q9LfCWgo

To claim this, I am signing this object:

@samhunta
samhunta / NerdTree.py
Created October 19, 2017 17:24 — forked from jacob-ogre/NerdTree.py
NerdTree-like behavior for Sublime Text 2
import sublime, sublime_plugin
class NerdTreeCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command("toggle_side_bar")
self.window.run_command("focus_side_bar")
command -v nodemon > /dev/null || npm install -g nodemon
echo '@test.js' >> ~/.gitignore_global
echo 'function nw() { touch @test.js && open @test.js && nodemon @test.js $@ && rm -rf @test.js }' >> ~/.zshrc
source ~/.zshrc
echo 'nw installed\n'
@samhunta
samhunta / gist:b071d862581532e34876633208fe19d2
Last active July 21, 2016 18:48 — forked from rtrouton/gist:f92f263414aaeb946e54
Install Xcode command line tools on 10.7.x - 10.10.x. Tested on 10.7.5, 10.8.5, 10.9.5 and 10.10.2.
#!/bin/bash
# Installing the Xcode command line tools on 10.7.x or higher
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
# Installing the latest Xcode command line tools on 10.9.x or higher
if [[ "$osx_vers" -ge 9 ]]; then
set -e
# Run our new web 2.0 todo list application and raise millions of VC dollars.
touch ~/Desktop/"$*"
osascript -e "tell application \"Finder\" to set label index of alias POSIX file \"`cd -P -- "$(dirname -- "/Users/samuelhunter/Desktop/$*")" && printf '%s\n' "$(pwd -P)/$(basename -- "~/Desktop/$*")"`\" to 3"
## Security measures
* Prevent users from abusing the system by driving fake traffic to their links [5hr]
* One IP can credit 2 links a day [1.2hr]
* Proxy detection, proxy traffic will pay less
* Bot traffic will not pay (user-agent, headers, and referral validation)
## Template Integration
## Security measures
* Prevent users from abusing the system by driving fake traffic to their links [5hr]
* One IP can credit 2 links a day [1.2hr]
* Proxy detection, proxy traffic will pay less
* Bot traffic will not pay (user-agent, headers, and referral validation)
## Template Integration
## Security measures
* Prevent users from abusing the system by driving fake traffic to their links [5hr]
* One IP can credit 2 links a day [1.2hr]
* Proxy detection, proxy traffic will pay less
* Bot traffic will not pay (user-agent, headers, and referral validation)
## Template Integration