Skip to content

Instantly share code, notes, and snippets.

View ndom91's full-sized avatar

Nico Domino ndom91

View GitHub Profile
@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

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 / 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

@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 / 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 / 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 / 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 / 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 / hn_search.js
Created November 3, 2020 20:43 — forked from meiamsome/hn_search.js
hn job query search
/* Hacker News Search Script
*
* Original Script by Kristopolous:
* https://gist.github.com/kristopolous/19260ae54967c2219da8
*
* Usage:
* First, copy the script into your browser's console whilst on the Hacker News
* jobs page. Then, you can use the query function to filter the results.
*
* For example,
@ndom91
ndom91 / pre-commit
Created December 11, 2020 21:41
ansible-lint shell git pre-commit hook
#!/bin/sh
# requires ansible-lint to be installed
# 'pip install --user ansible-lint'
# copy this file to .git/hooks/pre-commit and make it executable
#get list of files to add to commit checks - doesn't check files not being added in this commit
STAGED_FILES=$(git diff --staged --name-only --diff-filter=MAC | grep ".yml")
#if nothing being added, exit
if [[ "$STAGED_FILES" = "" ]]; then