Skip to content

Instantly share code, notes, and snippets.

View ndom91's full-sized avatar

Nico Domino ndom91

View GitHub Profile
@ndom91
ndom91 / global_entry.py
Created October 8, 2020 21:45 — forked from clay584/global_entry.py
Global Entry Appointment Notifier
#!/usr/bin/env python
import requests
import time
import sys
from datetime import datetime, timedelta
from twilio.rest import Client
# Idea and details located here. I just added SMS capability
@ndom91
ndom91 / netbox_import.py
Created May 26, 2020 17:01 — forked from rlaneyjr/netbox_import.py
Netbox devicetype-library import script
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: noai:et:tw=80:ts=4:ss=4:sts=4:sw=4:ft=python
'''
Title: netbox_import.py
Description: Insert records from devicetype-library into NetBox
Author: Ricky Laney
Version: 0.1.4
==============================================================================
@ndom91
ndom91 / keybase.md
Created March 6, 2020 11:10
keybase.md

Keybase proof

I hereby claim:

  • I am ndom91 on github.
  • I am ndom91 (https://keybase.io/ndom91) on keybase.
  • I have a public key whose fingerprint is CDF7 5C5B 5D5C 91A7 D2D3 DA89 15A8 0237 4035 F7CF

To claim this, I am signing this object:

@ndom91
ndom91 / docker.md
Created December 9, 2019 11:23
Docker Oneliners

Execute Action on fuzzymatch multiple containers

docker ps --format '{{.Names}}' | grep "^spawned-worker-" | awk '{print $1}' | xargs -I {} docker stop {}
@ndom91
ndom91 / git.sh
Created October 11, 2019 04:43
All Git Commands
#!/bin/bash
##########
# contents
##########
# contents
# notes
# script setup
# git config files
@ndom91
ndom91 / certs.md
Last active October 2, 2019 13:48
CA + Signed Key

Create Root CA (Only Once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

  1. openssl genrsa -out pve1.key 2048

If you want a non password protected key just remove the -des3 option

Keybase proof

I hereby claim:

  • I am ndom91 on github.
  • I am ndom91 (https://keybase.io/ndom91) on keybase.
  • I have a public key ASA3MSQKIrqQiITYVsGg53m4vA19Qqep5keWNPEd3WJbkAo

To claim this, I am signing this object:

@ndom91
ndom91 / docker-cleanup-resources.md
Created August 16, 2019 12:08 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ndom91
ndom91 / ignore_dsstore_globally.sh
Created August 16, 2019 07:27
Global .gitignore - .DS_Store
#!/bin/bash
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@ndom91
ndom91 / clean-up-boot-partition-ubuntu.md
Created June 21, 2019 09:29 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r