This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
sudo apt -y install gcc g++ make nodejs python3-dev python3-pip python3-setuptools | |
npm -g install npm@latest node-gyp | |
git clone https://github.com/nodenv/nodenv.git ~/.nodenvd['/'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get install mailutils | |
echo "inet_interfaces = loopback-only \ | |
relayhost = [smtp.mailgun.org]:587 \ | |
smtp_sasl_auth_enable = yes \ | |
smtp_sasl_password_maps = static:[email protected]:password \ | |
smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf | |
sudo service postfix restart | |
echo "This is my email test message" | mail -s "My subject line" [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -fsSL https://starship.rs/install.sh | bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
brew bundle dump |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# create user | |
adduser --disabled-password --gecos "" selfagency | |
# add to sudo group | |
usermod -aG sudo selfagency | |
# copy over ssh keys | |
rsync --archive --chown=selfagency:selfagency ~/.ssh /home/selfagency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function parseData() { | |
tail -n +2 $1 | | |
sed -re 's/\=/\:/g' | | |
sed -re 's/</\"/g' | | |
sed -re 's/>/\"/g' | | |
sed -re 's/No/false/g' | | |
sed -re 's/Yes/true/g' | | |
sed -re 's/\(/\[/g' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host selfagency.dev | |
ProxyCommand sh -c "updatefw; /usr/bin/nc %h %p" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
systemctl restart sshd | |
$AUTH=(xauth list | grep unix(echo $DISPLAY | cut -c10-12)) | |
export DISPLAY=localhost:10.0 | |
sudo xauth add $AUTH | |
sudo export DISPLAY=localhost:10.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copy the file "foobar.txt" from a remote host to the local host | |
scp [email protected]:foobar.txt /some/local/directory | |
# Copy the file "foobar.txt" from the local host to a remote host | |
scp foobar.txt [email protected]:/some/remote/directory | |
# Copy the directory "foo" from the local host to a remote host's directory "bar" | |
scp -r foo [email protected]:/some/remote/directory/bar |