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 / git-get-files-by-size.py
Last active September 25, 2022 00:36
Git this script lists the files that are larger than the size you specify. Example use: python git-find-big-files.py fix-remove-files 1000000 (file size in MBs)
#!/usr/bin/python
# run the script: python git-find-big-files.py <the branch> <file size>
# Example use: python git-find-big-files.py fix-remove-files 1000000 (this value equals 1 Megabyte)
# the Fix-remove-files specifies the branch that you are cleaning
import os, sys
def getOutput(cmd):
return os.popen(cmd).read()
@punkdata
punkdata / config
Created June 7, 2021 12:44
Terminator CLI config
# Belongs in ~/.config/terminator/config
[global_config]
title_font = Courier 10 Pitch 10
[keybindings]
[profiles]
[[default]]
background_darkness = 0.9
background_type = transparent
cursor_color = "#aaaaaa"
font = Ubuntu Mono 12
@punkdata
punkdata / docker-access
Created May 20, 2020 14:08
Fix access issues when running docker from SNAP packages
Create and join the docker group.
$ sudo addgroup --system docker
$ sudo adduser $USER docker
$ newgrp docker
You will also need to disable and re-enable the docker snap if you added the group while it was running.
$ sudo snap disable docker
$ sudo snap enable docker
# Use this command to extract the data from a file after the "=" charcater
grep smoke_test_ip test.txt | cut -d '=' -f 2-
@punkdata
punkdata / pm_install.sh
Created November 3, 2017 16:36
Postman Install Ubuntu 17.10
#!/usr/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman

Keybase proof

I hereby claim:

  • I am punkdata on github.
  • I am datapunk (https://keybase.io/datapunk) on keybase.
  • I have a public key ASC9TfDSE0Emvxmyr9kYX4PWf1JKq7IFN41Ay1UjaQfLNAo

To claim this, I am signing this object:

@punkdata
punkdata / cloud-config.yaml
Last active August 8, 2018 06:21
CoreOS cloud-config.yaml Example
#cloud-config
hostname: <your hostname>
ssh_authorized_keys:
- ssh-rsa < your Public SSH key AAAAB3NzaC1... >
coreos:
etcd:
addr: $private_ipv4:4001
@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
@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 / 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