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/python | |
print "\n*********************************************************************" | |
print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version" | |
import os | |
import socket | |
import hashlib | |
import struct | |
# get the host id and host name to calculate the hostkey | |
hostid=os.popen("hostid").read().strip() | |
hostname = socket.gethostname() |
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
#compdef lxc-start lxc-stop lxc-console lxc-restart lxc-create lxc-destroy lxc-monitor lxc-cgroup lxc-checkpoint lxc-execute lxc-freeze lxc-unfreeze lxc-info lxc-netstat lxc-ps lxc-wait | |
#===================================================================================================== | |
# original source is here: https://lists.linuxcontainers.org/pipermail/lxc-devel/2010-April/001172.html | |
#===================================================================================================== | |
_lxc_containers() { | |
local -a containers | |
containers=( $(/bin/ls /var/lib/lxc) ) | |
compadd "$@" -a containers |
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
osascript | |
-e 'tell application "iTerm"' | |
-e 'activate' | |
-e 'if (count of windows) = 0 then' | |
-e ' set t to (create window with profile "cisco")' | |
-e 'else' | |
-e ' set t to current window' | |
-e 'end if' | |
-e 'tell t' | |
-e ' set newTab to (create tab with profile "cisco" command "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
#!/bin/sh | |
# Change Mirrors | |
# sed --in-place 's/us.archive.ubuntu.com/mirror.0x.sg/' /etc/apt/sources.list | |
# sed --in-place 's/us.archive.ubuntu.com/download.nus.edu.sg\/mirror/' /etc/apt/sources.list | |
get_and_execute() | |
{ | |
FILE=$1 | |
echo "Getting $FILE" |
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
# Prereq | |
brew tap jlhonora/lsusb | |
brew install autoconf doxygen automake libtool libusb libusb-compat --universal wget pkgconfig lsusb | |
# Libnfc | |
git clone [email protected]:nfc-tools/libnfc.git | |
cd libnfc | |
./make_release.sh | |
autoreconf -vis | |
./configure --enable-doc --with-drivers=all --sysconfdir=/etc --prefix=/usr |
I hereby claim:
- I am jellyjellyrobot on github.
- I am jellyjellyrobot (https://keybase.io/jellyjellyrobot) on keybase.
- I have a public key whose fingerprint is CB25 3D12 B5AF F863 50DD 74CF 4D00 1E92 3F1D 6029
To claim this, I am signing this object:
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
-- Adapted from canuckistani/openItermHere.scpt | |
-- https://iterm2.com/applescript.html <- new api | |
-- cd to the current finder window folder in iTerm. Or drag a folder onto this script to cd to that folder in iTerm. | |
-- found this script in the comments of this article: http://www.macosxhints.com/article.php?story=20050924210643297 | |
-- Instructions for use: | |
-- paste this script into Script Editor and save as an application to ~/Library/Scripts/Applications/Finder/cd to in iTerm | |
-- run via the AppleScript Menu item (http://www.apple.com/applescript/scriptmenu/) | |
-- Or better yet, Control-click and drag it to the top of a finder window so it appears in every finder window. |
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
## For those times when you're too lazy to reboot and your Mac DNS client screws up. | |
sudo discoveryutil mdnsflushcache | |
sudo discoveryutil udnsflushcaches | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist |
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
#Download and run Relevant files from http://www.ellert.se/twain-sane/ | |
#TWAIN SANE Interface | |
#SANE Preference Pane | |
#SANE backends | |
#libusb | |
# Scan images using command line | |
#scanimage --mode Gray --depth 16 --resolution 300 -x 215 -y 297 --format=tiff > blah.tiff |