Skip to content

Instantly share code, notes, and snippets.

View ndom91's full-sized avatar

Nico Domino ndom91

View GitHub Profile
# Download Loki
curl -O -L "https://github.com/grafana/loki/releases/download/v2.0.0/loki-linux-amd64.zip"
# Extract Loki's binary
unzip "loki-linux-amd64.zip"
# Make it executable
chmod a+x "loki-linux-amd64"
# Move it to your bin path with the name "loki"
@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 / 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 / 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 / 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 
@ndom91
ndom91 / gist:751514c408824113871897543b60e853
Created May 25, 2019 10:12 — forked from vasekch/gist:8e71a93a16881415e5afbd20c6331163
Ubuntu 16.04 Mikrotik L2TP VPN settings
Install l2tp support
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome
https://askubuntu.com/a/898086
@ndom91
ndom91 / Documentation.md
Created September 23, 2018 17:39 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window