Skip to content

Instantly share code, notes, and snippets.

View tapickell's full-sized avatar
🌴
Just happy to be here

Todd Pickell tapickell

🌴
Just happy to be here
View GitHub Profile
@tapickell
tapickell / net_speed.sh
Created April 30, 2019 00:16
net_speed of one nic
#!/bin/sh
SLP=1 # output / sleep interval
DEVICE=$1
IS_GOOD=0
for GOOD_DEVICE in `grep \: /proc/net/dev | awk -F: '{print $1}'`; do
if [ "$DEVICE" = $GOOD_DEVICE ]; then
IS_GOOD=1
break
fi
@tapickell
tapickell / .zshrc
Created April 13, 2019 14:58
zshrc from x240
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="nt9"
plugins=(command-not-found history cabal mosh mix rebar nvm battery docker git aws jsontools last-working-dir npm debian pip redis-cli sudo web-search)
@tapickell
tapickell / .xinitrc
Created April 13, 2019 14:53
xinit config from x240
setxkbmap -option 'caps:ctrl_modifier'
xinput set-prop "SynPS/2 Synaptics TouchPad" "Tapping Enabled" 1
xinput set-prop "SynPS/2 Synaptics TouchPad" "Tapping Enabled Default" 1
xinput set-prop "SynPS/2 Synaptics TouchPad" "Natural Scrolling Enabled" 1
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout libraries
local wibox = require("wibox")
local vicious = require("vicious")
local redflat = require("redflat")
-- Theme handling library
defmodule A do
def err(_, <<length, data :: binary>>) do
case {length, data} do
{0, _} -> data
{4, <<rest :: binary>>} -> rest
end
end
end
<<0>> = A.err(0, <<0>>)
@tapickell
tapickell / .spacemacs
Created December 17, 2016 14:55
Spacemacs config
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@tapickell
tapickell / sep
Created December 2, 2016 19:25
Mcafee Endpoint Killer
#!/bin/bash
# relaunch with sudo if we aren't root
if [[ $EUID -ne 0 ]]; then
echo "$0: relaunching as sudo $0 $1 $USER"
sudo "$0" $1 $USER
exit $?
fi
real_user=$USER

Keybase proof

I hereby claim:

  • I am tapickell on github.
  • I am tapickell (https://keybase.io/tapickell) on keybase.
  • I have a public key ASDI0a69v6TibVa93SrCEwmOT7VIPDyqEu9sPr8Wj6js8go

To claim this, I am signing this object:

@tapickell
tapickell / dropkick.sh
Created August 17, 2016 15:33
Turn off spy cams in airbnb rentals
#!/bin/bash
#
# DROPKICK.SH
#
# Detect and Disconnect the DropCam and Withings devices some people are using to
# spy on guests in their home, especially in AirBnB rentals. Based on Glasshole.sh:
#
# http://julianoliver.com/output/log_2014-05-30_20-52
#
# This script was named by Adam Harvey (http://ahprojects.com), who also
@tapickell
tapickell / sandi_meter_spec.rb
Last active May 12, 2016 14:12
An example of using the Sandi Metz Meter Gem in a test suite.
require "rails_helper"
RSpec.describe 'Sandi Meter Results' do
before :all do
results = %x{ sandi_meter }
@classes,@methods,@parameters,@controllers = results.scan(/(...)[%]/).flatten.map{ |s| s.to_i }
end
it '100% of classes are under 100 lines' do
expect(@classes).to eq(100)