Skip to content

Instantly share code, notes, and snippets.

View punkdata's full-sized avatar
🤖
Beep Boop

Angel Rivera punkdata

🤖
Beep Boop
View GitHub Profile
#!/bin/bash
sudo yum install -y nfs-utils libnfsidmap
# Enable the nfs client service
systemctl enable rpcbind
systemctl start rpcbind
mkdir /data
@punkdata
punkdata / EC2-ECS-Spot.sh
Created June 7, 2016 22:36
AWS EC2 Spot Instance with ECS Agent install
# Put this in the User data parameter in the spot instance
#!/bin/bash
yum -y update
yum install -y ecs-init
touch /etc/ecs/ecs.config
echo "ECS_CLUSTER=prezpoll" > /etc/ecs/ecs.config
service docker start
start ecs
#!/bin/bash
sudo yum makecache fast
sudo yum -y update
sudo systemctl stop firewalld && sudo systemctl disable firewalld
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config && sudo groupadd nogroup
sudo sed -i 's/^#\s*\(%wheel\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/\1/' /etc/sudoers
#cloud-config
hostname: core01
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDArlyas86BhZq5KVK9xwnjA5FF6nzEyZv03Ln0PEJ0x90KznA7vijsXoMuu3wC/ZFzxNqdtIi8B7MwbwWi0RSBLF5BeVunA+Oun0vpEtByUEKlyKJSYSJdYmYTjU4LtwowJJQ8FNQ7KrRQyqeriTe/07i5PfuW9XzMQVje1OFV8M8xXmVxBmb1yYpfaBvuynYH6mycO6vdBxGGjmVezTwLeMNDOfEUoa+Fs+i8raMHzteNSUvbyVazCj7i4tucAhf78lpPt+pvNgELdTtyu6sOdDkfjIs/uDEOX5yrgpk0QC3n9WWZjeyBeew3H/n17yyZkU8UaZhhYt+8NmWrndhd ariv3ra@gmail.com
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
@punkdata
punkdata / interfaces
Created April 14, 2017 15:31
pixelOS wlan0 config
# goes in file: /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
@punkdata
punkdata / bash-shortener.sh
Created April 29, 2017 15:00
debian/ubuntu bash shorten the prompt to the current working directory put this in .bashrc file
export PS1='$(whoami):${PWD/*\//}# '
@punkdata
punkdata / docker_helper_cmd.sh
Last active August 2, 2017 14:52
Docker cmd helper scripts & commands
#remove all exited docker containers
docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm
# Remove all images tagged as <none>
docker rmi $(docker images -f "dangling=true" -q)
# DANGEROUS remove all images from docker
docker rmi $(docker images | grep "$2/\|/$2 \| $2 \|$2 \|$2-\|$2_" | awk '{print $1 ":" $2}') 2>/dev/null || echo "No images matching \"$2\" to purge."
@punkdata
punkdata / linux-term-cmds.sh
Last active October 27, 2017 03:08
Linux Terminal Commands
# Search Type Commands
grep -Ril "text-to-find-here" /
# rsync command to actually sync files
rsync -hvrPt angel/home_angel/ /home/angel/
# rsync copy over all files with all attributes
rsync -avP source-dir target-dir
@punkdata
punkdata / setup-mysql.sh
Created February 16, 2018 00:43 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@punkdata
punkdata / arduino_ubuntu.txt
Created March 21, 2018 17:54
Ubuntu Arduino fix for Acccess Denied when Uploading
# When getting access denied during upload function in arduino use this cmd to give current user permission on Ubuntu OS
sudo usermod -a -G dialout $USER