This file contains 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
#!/bin/bash | |
echp Add a new mounted volue and mset it up to be mounted on boot | |
echo "instructions from https://devopscube.com/mount-extra-disks-on-google-cloud/" | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi |
This file contains 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
#!/bin/bash | |
echp Add a new mounted volue and mset it up to be mounted on boot | |
echo "instructions from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html" | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi |
This file contains 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
#!/bin/bash | |
set -e | |
EXEC_PATH=/usr/sbin/screencapture | |
FOLDER=~/Pictures/journal/$(date +"%Y")-w$(date +%V)/$(date +'%Y-%m-%d') | |
mkdir -p $FOLDER | |
FILES="" | |
for screen in screen1 screen2 |
This file contains 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
# to expand /dev/xvdb check out https://github.com/hackoregon/civic-devops/blob/master/docs/HOWTO-extend-EBS-Volume-size.md | |
# we have used it and it works | |
# Expand it | |
sudo growpart /dev/xvda 1 | |
# Check if the the volume had the correct size | |
lsblk | |
# Use it |
This file contains 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
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
file -s /dev/xvdb | |
mkfs -t ext4 /dev/xvdb | |
mkdir /data |
This file contains 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
sudo apt-get update | |
sudo apt-get install vim tmux -y | |
# DOCKER | |
sudo apt install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg2 \ | |
software-properties-common |
This file contains 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
# Change the size of the tty instance, so we in a docker instace docker (example) can have longer rows | |
stty rows 50 cols 180 | |
# Remove dangling images | |
docker rmi $(docker images --quiet --filter "dangling=true") | |
# Remove images and more from docker (https://docs.docker.com/engine/reference/commandline/system_prune/#description) | |
docker system prune --all |
This file contains 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
/* | |
* Game created for the awesome badges at NodeConf EU 2017 | |
* One player will see what the other player should press and tell them that | |
* And the other player will see what the first player needs to press | |
* For every successfull level, the combination of buttons gets harder | |
* and you have less and less time to complete. You win or loose together! | |
* | |
* It doesnt work perfect though. | |
* | |
* To use it, you need to get the addresses of each of the two badges and put them |
This file contains 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
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get update | |
apt-get install -y \ |
This file contains 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
~ |