This file contains 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 ruby | |
require 'rubygems' | |
require 'rotp' | |
# This is a script to use two factor authentication with public ssh keys (since you can't use PAM (g2fa) and public keys) | |
# You must refrence this script in your sshd config: ForceCommand="/usr/bin/two_factor_ssh" | |
# The script has to be executible by the user logging in | |
# get the username of the user logging in | |
user = ENV["USER"] |
This file contains 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 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 | |
# |
This file contains 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
// Use absolute URLs to navigate to anything not in your Router. | |
// Only need this for pushState enabled browsers | |
if (Backbone.history && Backbone.history._hasPushState) { | |
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble | |
$(document).delegate("a", "click", function(evt) { | |
// Get the anchor href and protcol | |
var href = $(this).attr("href"); | |
var protocol = this.protocol + "//"; |
This file contains 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
HTTP_HOST:whatsmyuseragent.com | |
HTTP_USER_AGENT:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 | |
HTTP_X_WAP_PROFILE:http://device.sprintpcs.com/HTC/APA9292KT/3706511.rdf |