Skip to content

Instantly share code, notes, and snippets.

View simplyspoke's full-sized avatar

Tristan Fitzgerald simplyspoke

View GitHub Profile
@simplyspoke
simplyspoke / origin
Created October 14, 2018 05:19
Family Origin & Coat of Arms
Motto:
"Crom a boo"
@simplyspoke
simplyspoke / keybase.md
Created September 25, 2018 20:27
keybase.md

Keybase proof

I hereby claim:

  • I am simplyspoke on github.
  • I am simplyspoke (https://keybase.io/simplyspoke) on keybase.
  • I have a public key ASCdepV-KzjxzWQPYK8wLjVv4LzdnHgSf-vBGu10P8RFbAo

To claim this, I am signing this object:

@simplyspoke
simplyspoke / convert
Created September 11, 2018 20:36
camelCase to _CapCase
const value = 'SomeThingHere'
.replace('Command', '')
.replace(/([A-Z])/g, c => {
console.log(c)
return `_${c}`;
})
.replace(/^\w/, c => c.toUpperCase());
console.log(value);
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@simplyspoke
simplyspoke / install-fileserver.sh
Created February 4, 2017 07:05
Old AWS Hosting Solution
#!/bin/bash
sudo -i
sudo passwd root
userdel -rf ubuntu
perl -pi -e 's%(universe)$%$1 multiverse%' /etc/apt/sources.list
apt-get update && apt-get upgrade
apt-get install build-essential ec2-ami-tools ec2-api-tools euca2ools rpcbind nfs-kernel-server php5-cli php5-mysql php5-mcrypt php5-mcrypt php5-dev php-pear php5-curl cpipe
ec2attvol VOLUMNID -i INSTANCEID -d /dev/sdf
mkfs -t ext3 /dev/xvdf
mkdir /vol
@simplyspoke
simplyspoke / .bashhistory
Created February 4, 2017 06:55
Old AWS Scripts - (used in setting up a autoscaling env if I remember correctly)
perl -pi -e 's%(universe)$%$1 multiverse%' /etc/apt/sources.list
apt-get update && apt-get upgrade
apt-get install -y xfsprogs build-essential ec2-ami-tools ec2-api-tools euca2ools php5-cli php5-mysqli php5-mcrypt php5-dev php-pear php5-curl
dpkg-reconfigure tzdata
modprobe xfs
vi /etc/hostname
vi /etc/crontab
vi /etc/logrotate.conf
vi /etc/exports
vi /etc/fstab
@simplyspoke
simplyspoke / Gmail Commands
Created February 4, 2017 06:42
IMAP Sync
#!/bin/sh
#Configure User
SERVER1=mail.example.com
UNAME1=someone@example.com
PWORD1='password'
UNAME2=csomeone@example.com
PWORD2='password'
#Blank this out if you want to see folder sizes
@simplyspoke
simplyspoke / node-and-npm-in-30-seconds.sh
Created February 4, 2017 02:51 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh