Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Matt Baer thebaer

🎯
Focusing
Block or report user

Report or block thebaer

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
@thebaer
thebaer / rotatemac.sh
Last active Feb 13, 2016
Generate new MAC address for accessing time-limited hotspots
View rotatemac.sh
#!/bin/bash
# Generate new MAC address for accessing time-limited hotspots like Boingo
# Modification may be needed; tested on Chrome OS
# No warranty / guarantees made. Use at your own risk. This probably violates some Terms of Service.
sudo ifconfig wlan0 down
# Source: http://superuser.com/questions/218340/how-to-generate-a-valid-random-mac-address-with-bash-shell
sudo ifconfig wlan0 hw ether $(echo -n 00:60:2F; dd bs=1 count=3 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02X"')
# OS X:
# sudo ifconfig en0 ether $(echo -n 00:60:2F; dd bs=1 count=3 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02X"')
View blockchain.txt
Verifying that +baer is my blockchain ID. https://onename.com/baer
View keybase.md

Keybase proof

I hereby claim:

  • I am thebaer on github.
  • I am is (https://keybase.io/is) on keybase.
  • I have a public key whose fingerprint is CEA0 00FB DC41 EF11 E741 4094 9C4C E3A2 7D62 A6FB

To claim this, I am signing this object:

View removeTrailingZeros.go
avgStr := strings.TrimRight(fmt.Sprintf("%.2f", avg), "0")
avgStr = strings.TrimRight(avgStr, ".")
@thebaer
thebaer / .welcome.sh
Last active Aug 29, 2015
A little script for welcoming you to your newly-opened terminal. Targeted at Ubuntu.
View .welcome.sh
#!/bin/bash
BLUE="\033[0;34m"
LBLUE="\033[1;34m"
GRAY="\033[1;30m"
NC="\033[00m"
spacing=" $GRAY$NC "
case $(date +%u) in
@thebaer
thebaer / normalizeicons.sh
Created Sep 1, 2014
Quickly make image(s) a given dimension by changing canvas size, not scaling.
View normalizeicons.sh
#!/bin/bash
# Make the given file(s) the given dimension, by extending the canvas, rather
# than scaling. Made especially for PNGs, since it makes the background
# transparent and all. This programmer in particular has found it useful for
# different-sized icons that end at their exact boundaries, causing headaches
# when developing Android apps.
# Name some args
FINALSIZE=$1
@thebaer
thebaer / renamer.sh
Last active Aug 29, 2015
Standardizes image file names (especially from iOS land) to be usable as Android resources.
View renamer.sh
#!/bin/bash
# Standardizes image file names to be usable as Android resources.
# Gotta have some parameters to continue
if [ -z "$1" ]; then
echo "usage: renamer.sh file [file2...]"
echo
exit 1
fi
@thebaer
thebaer / .bashrc
Last active Dec 31, 2015
Initialize a new server with the essentials.
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@thebaer
thebaer / help.json
Created Apr 24, 2013
LunchTable's Help / FAQ file.
View help.json
{
"Getting Started": [
{
"slug": "what",
"question": "What is LunchTable?",
"answer": "<p>LunchTable is a software platform built for group communication.</p>"
},
{
"slug": "how",
"question": "How does it work?",
@thebaer
thebaer / facebook.css
Created Nov 29, 2012
Hide Facebook chat, some sidebar groups, and requests
View facebook.css
/* Hide chat sidebar */
#pagelet_sidebar {
display: none;
}
.sidebarMode .fbx #globalContainer, .sidebarMode .fbx #pageHead, .sidebarMode #blueBar #pageHead {
padding-right: 0px;
}
/* Hide left sidebar groups: Ads, Apps */
#adsNav, #appsNav {
You can’t perform that action at this time.