Skip to content

Instantly share code, notes, and snippets.

View jangeador's full-sized avatar
🐵

Delio Castillo jangeador

🐵
View GitHub Profile
@instantdreams
instantdreams / npm_backup.sh
Created January 6, 2022 23:44
Backup entire NPM configuration to a set location
#!/bin/bash
# Script location : /srv/bin/npm_backup.sh
# npm_home : Location of nginx-proxy-manager installation
# backup_target : Folder name for backup
npm_home=/srv/nginx-proxy-manager
backup_target=/media/Backups/nginx-proxy-manager
# Import protected variables
source /srv/bin/.env
# Create Backup
@raiever
raiever / json_SUNAPI.py
Created March 30, 2021 18:30
Get JSON response of SUNAPI
import requests
from requests.auth import HTTPDigestAuth
def get_json(cgi, user, password, headers={'Accept': 'application/json'}):
response = requests.get(cgi, auth=HTTPDigestAuth(user, password), headers)
response_json = response.json()
return response
# in the case of Heatmap, if want to get key values,
# heatmap_response_json['HeatMap'][0].keys()
@ckrybus
ckrybus / 1integrate-django-filter-django-tables2-django-crispy-forms.md
Last active December 9, 2024 23:16
How to integrate django-crispy-forms, django-tables2 and django-filter in order to display a paginated table with filter functionality.
@npearce
npearce / install-docker.md
Last active February 5, 2025 14:15
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@thiagomarini
thiagomarini / readme.sh
Created October 29, 2018 16:10
How to install supervisor on Amazon Linux
# Install it as a yum package instead of throgh pip (will save you from lots of hassle)
# first get epel
sudo amazon-linux-extras install epel
# then install supervisor
sudo yum install supervisor
@someguycrafting
someguycrafting / nexmon.sh
Last active May 19, 2022 06:27
Raspberry PI 3 / Zero Wi-Fi monitor mode setup
#!/bin/bash
# Thanks to all the nice folks @seemoo-lab for making this possible.
# See: https://github.com/seemoo-lab/nexmon
# This script should be run as root (i.e: sudo ./nexmon.sh) from the /home/pi/ directory!
function info {
tput bold;
tput setaf 3;
echo $1;
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active February 9, 2025 08:02
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@tzapu
tzapu / docker-compose.yml
Last active September 26, 2022 05:13
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time