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
@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 / 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 / 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
#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
#!/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
@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 install -y nfs-utils libnfsidmap
# Enable the nfs client service
systemctl enable rpcbind
systemctl start rpcbind
mkdir /data
@punkdata
punkdata / alexa-lambda-python-example.py
Created August 13, 2016 14:09
Alexa Python Lambda Example
"""
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guide at
http://amzn.to/1LGWsLG
"""
from __future__ import print_function
@punkdata
punkdata / recert.txt
Created August 5, 2016 13:09
Archlinux PGP Certs
# pacman-key --init
# pacman-key --populate archlinux
# pacman-key --refresh-keys
@punkdata
punkdata / VMWare11Fix.txt
Created April 11, 2016 17:23
VMWare 11 on Manjaro Linux Fix
export VMWARE_USE_SHIPPED_LIBS=yes
To set it on startup, add that line above to .xprofile via:
nano .xprofile