Skip to content

Instantly share code, notes, and snippets.

View BirkhoffLee's full-sized avatar
🎓
Learning about CS

birkhoff BirkhoffLee

🎓
Learning about CS
View GitHub Profile
@BirkhoffLee
BirkhoffLee / installMySQL.sh
Last active March 16, 2017 09:45
Install MySQL server for BungeeCord and Spigot plugins on Linode Ubuntu 16.04
#!/bin/bash
# Settings
USERNAME="mysqluser"
SSH_PUBKEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClxraaf0yoYrLWhxD1gdFopR/20Z54spf4ecbAXTch42HLpMimFh18qNa4easbeP8SPjt94arV+BxHFmCaK41YsP1tJL/5I1DsnPyYew5ZJjWGBeGF7nMvht5ostKPOa+tpuQP/z5goE7gQxF+46nMnO2q7bHG4+6xl4fLq+yoWY8vpBgW6RUTPPExhHXaV+KxFBmroW1AXvcM2nxnrAQFcG6mvPhnIUpDjYtUvq48lch34MwuX+ckPYXCBinDTekS/ZV9/H4XjVsv/Uay3cAz5VG5SuwXsSCJfgMJFGw86wYRcFe401rnG1LnWJczHPCtzA6CuY25UdptcQYCH+lV [email protected]"
# Check permissions
if [[ $(id -u) -ne 0 ]]; then
printf "The script must be run as root! \n"
exit 1
@BirkhoffLee
BirkhoffLee / MinecraftAFKMining.ahk
Created February 16, 2017 10:11
An AutoHotKey script for Minecraft AFK mining, which keep pressing the left mouse button and locks the movement of mouse while mining. Use "z" to toggle.
z::
if GetKeyState("LButton") {
Send % "{Click Up}"
BlockInput, MouseMoveOff
} else {
Send % "{Click Down}"
BlockInput, MouseMove
}
return
@BirkhoffLee
BirkhoffLee / iterm_profile.json
Created January 29, 2017 09:24
iTerm2 profile set
{
"Link Color" : {
"Red Component" : 0.023,
"Color Space" : "Calibrated",
"Alpha Component" : 1,
"Blue Component" : 0.678,
"Green Component" : 0.27
},
"Tags" : [
@BirkhoffLee
BirkhoffLee / gta_online_kick_everyone.bat
Last active September 26, 2016 09:38
Kick everyone in the public session of GTA Online.
@echo off
CLS
if "%minimized%"=="" set minimized=true & start /min cmd /c "%~dpnx0" & goto :EOF
:init
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
@BirkhoffLee
BirkhoffLee / installPowerlineForBashAndTmux.sh
Last active November 1, 2016 15:02
Installer for Powerline for Bash & Tmux, not tested, for OS X 10.11.6
#!/bin/bash
python_version=3.5.2
cd
sudo sed -i '1iexport LANG=en_US.UTF-8' ~/.profile
sudo sed -i '1iexport LC_ALL=en_US.UTF-8' ~/.profile
brew update
@BirkhoffLee
BirkhoffLee / installDocker.sh
Last active May 3, 2017 05:47
Install Docker on Ubuntu with nice security settings.
#!/bin/bash
# Settings
USERNAME="docker"
SSH_PUBKEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClxraaf0yoYrLWhxD1gdFopR/20Z54spf4ecbAXTch42HLpMimFh18qNa4easbeP8SPjt94arV+BxHFmCaK41YsP1tJL/5I1DsnPyYew5ZJjWGBeGF7nMvht5ostKPOa+tpuQP/z5goE7gQxF+46nMnO2q7bHG4+6xl4fLq+yoWY8vpBgW6RUTPPExhHXaV+KxFBmroW1AXvcM2nxnrAQFcG6mvPhnIUpDjYtUvq48lch34MwuX+ckPYXCBinDTekS/ZV9/H4XjVsv/Uay3cAz5VG5SuwXsSCJfgMJFGw86wYRcFe401rnG1LnWJczHPCtzA6CuY25UdptcQYCH+lV [email protected]"
# Check permissions
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
@BirkhoffLee
BirkhoffLee / keybase.md
Created March 6, 2016 12:45
Keybase.io Verification

Keybase proof

I hereby claim:

  • I am BirkhoffLee on github.
  • I am birkhoff (https://keybase.io/birkhoff) on keybase.
  • I have a public key whose fingerprint is D72A 7413 71B8 393D 6327 5256 4B09 ECA2 27EF 342B

To claim this, I am signing this object: