Skip to content

Instantly share code, notes, and snippets.

Brian Hartvigsen tresni

  • OpenDNS
  • Boise, Idaho
Block or report user

Report or block tresni

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
View ssh-resethost
#!/bin/sh
reset_host() {
all="$1 $(dig +short $1) $(dig +short aaaa $1)"
for ident in $all
do
ssh-keygen -f ~/.ssh/known_hosts -R $ident
ssh-keyscan $ident >>~/.ssh/known_hosts
done
View dotfiles-install.sh
#! /bin/bash
GIT_REPO=${GIT_REPO:-keybase://private/tresni/dotfiles}
DOTFILES_PATH=${DOTFILES_PATH:-$HOME/.dotfiles}
git clone --bare "${GIT_REPO}" "${DOTFILES_PATH}"
function dotfiles {
/usr/bin/git --git-dir="${DOTFILES_PATH}" --work-tree="$HOME" $@
}
mkdir -p "${DOTFILES_PATH}-backup"
@tresni
tresni / csd-wrapper.sh
Created Sep 14, 2017 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
View csd-wrapper.sh
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
View bitbar-check.py
import re
import os
import sys
for root, dirs, files in os.walk("."):
for f in files:
if f == "README.md" or f == "test.py":
continue
if f.startswith("."):
continue
@tresni
tresni / superspark.rb
Created May 19, 2015
Personal superspark Formula
View superspark.rb
class Superspark < Formula
homepage "https://github.com/tresni/superspark"
head "https://github.com/tresni/superspark.git"
sha256 ""
def install
bin.install "superspark"
end
test do
@tresni
tresni / dragondrop.rb
Created Apr 23, 2015
Cask for DragonDrop
View dragondrop.rb
cask :v1 => 'dragondrop' do
version :latest
sha256 :no_check
url 'http://shinyplasticbag.com/dragondrop/dragondrop.dmg'
name 'DragonDrop'
homepage 'http://shinyplasticbag.com/dragondrop/'
license :freemium
app 'DragonDrop.app'
View gist:83b9181588c7393f6853

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

View keybase.md

Keybase proof

I hereby claim:

  • I am tresni on github.
  • I am tresni (https://keybase.io/tresni) on keybase.
  • I have a public key whose fingerprint is C04E B13D 266B 3C2F 56CB 8880 4A00 DB3D 202D 5E3C

To claim this, I am signing this object:

View gist:dff8d00e3237016d26ef
# Usage: dash [keyword:]query
dash() { open dash://"$*" }
compdef _dash dash
# special thanks to [arx] in #zsh for helping me get this working
_dash() {
# No sense doing this for anything except the 2nd position
if (( CURRENT == 2 )); then
local -a _all_docsets
_all_docsets=()
View RickshawGraph.md

Graphing Widget

The graphing widget shows graphs using the Rickshaw graphing library. The names of data fields should be (vaguely) familiar if you've used Rickshaw before.

It's recommended that you replace the /assets/javascripts/rickshaw.min.js from your dashboard with the latest from here.

Supported HTML data fields

You can’t perform that action at this time.