Skip to content

Instantly share code, notes, and snippets.

View richbodo's full-sized avatar

Rich Bodo richbodo

View GitHub Profile
@richbodo
richbodo / gist:08974a4a818aa047cb0e3cb429c24b95
Created June 19, 2019 02:41
Update protocol buffers on deb 9 to 3.7.1
PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local include/*
rm -f $PROTOC_ZIP
@richbodo
richbodo / crostini_solidity_config.sh
Last active October 5, 2018 20:21
Config a new pixelbook crostini container for smart contract developement
#!/bin/bash
# Basic stuff I need to get all the other stuff
# I think git, curl, and python were in the container already
sudo dpkg-reconfigure tzdata
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apt-file
sudo apt-file update
sudo apt-get install python emacs-nox screen git ssh wget curl gnupg build-essential iputils-ping telnet netcat
# Web-dev packaging stuff
@richbodo
richbodo / network_report.sh
Last active September 23, 2015 01:02
Simple command line report of network status for mac OSX
#!/bin/sh
echo "******************"
echo "* En0 IP, Gateway, and Nameservers"
echo "******************"
echo
ifconfig en0 | grep -v inet6 | head -n 3
netstat -nr | head -n 5
scutil --dns | grep -i nameserver
echo
@richbodo
richbodo / convertall.sh
Created September 21, 2015 21:17
When converting html2text, use Aaron Schwartz's awesome html2text and bash
#!/bin/bash
# to convert a bunch of html files to text,
# use Aarons excellent https://github.com/aaronsw/html2text !
for i in *.html; do
echo $i
j=`echo $i | sed -e 's/ /_/g'`
echo $j
mv "$i" "$j"
html2text $j > `echo $j | sed -e 's/\.html/\.txt/g'`
done
@richbodo
richbodo / remove_evil_ubuntu_quantal.sh
Last active December 11, 2015 12:28
Purge Evil from Ubuntu 12.10 Quantal Quetzal
#!/bin/bash
# remove_evil_ubuntu_quantal.sh
if [ $(whoami) != "root" ]; then
echo "You need to run this script as a super user."
echo "Use 'sudo ./$script_name 2>&1 | tee log.txt' then enter your password when prompted. exorcism results will be logged to log.txt."
exit 1
fi
echo "This script is going to remove bizarre spyware and upgrade you to the full Gnome3 environment. You won't be using unity any longer."
echo "Did you read and understand this code snippet before you tried to run it? (y/n)"