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/bash | |
# | |
# yoga-auto-rotate -- ghetto-style tablet mode, with keyboard and all. | |
# | |
# Simple little script that will detect an orientation change for a | |
# Lenovo Yoga 13 (very hackily) and adjust the active display's | |
# orientation and disable/enable the touchpad as necessary. | |
# | |
# The Yoga 13 will emit keycode `e03e` at one second intervals | |
# when the screen is flipped into tablet mode. Since this keycode |
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/bash | |
# | |
# proxy -- simple socks proxy for those open wifi networks. | |
# | |
# Usage is simple: | |
# | |
# proxy <up|down|watch|show|ssh> [alt remote port] [alt remote host] | |
# | |
# `proxy up` will create a socks proxy listening locally on 8000 by | |
# default, through a rhost server via ssh over port 53 (dns/domain). |
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/bash | |
# | |
# port-route -- route one port's traffic to another. | |
# | |
# Simple utility that wraps `iptables` to enable routing TCP | |
# traffic of one port to another. | |
# | |
# Usage: | |
# | |
# port-route <up|down|show> <source port> <destination port> |
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/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
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/bash | |
# | |
# twentyfivesixty-over-hdmi -- force an HDMI output to drive 2560x1440 | |
# | |
# Ghetto-fabulous script that sets up a 2560x1440 mode for an HDMI output | |
# and allows toggling usage. | |
# | |
# I've been using a Dell U2713HM as an external monitor at work with my | |
# Lenovo Yoga 13, but unfortunately the HDMI port doesn't detect the native | |
# resolution of the monitor (2560x1440) as a valid output. In fact, all |
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
# | |
# i3 config | |
# | |
# Written under the assumption that capslock is rebound via | |
# the following .Xmodmap config: | |
# | |
# clear mod3 | |
# clear lock | |
# remove mod1 = Hyper_L | |
# remove mod2 = Hyper_L |
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
# | |
# i3 `status_command` config | |
# | |
# @author emiller | |
# @date 2014-09-09 | |
# | |
general { | |
interval = 5 | |
colors = true |
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/bash | |
export LANG="en_US.UTF-8" | |
export LANGUAGE="en_US" | |
txtrst='\033[00m' # Text Reset (\e[0m') | |
txtblk='\e[0;30m' # Black - Regular | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
txtylw='\e[0;33m' # Yellow |
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 python | |
import os | |
import math | |
from numpy import interp | |
from random import choice, sample | |
from time import sleep | |
from math import log1p | |
# from colour import Color |
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/bash | |
# | |
# ppa: brightbox/ruby-ng/ubuntu | |
# | |
BINS="gem irb rake ruby ri rdoc erb" | |
VERS="1.9 1.9.1 2.0 2.1 2.2 2.3" | |
function display_alternatives() { | |
update-alternatives --display ${1:?"bin name"} |