Skip to content

Instantly share code, notes, and snippets.

View jangeador's full-sized avatar
🐵

Delio Castillo jangeador

🐵
View GitHub Profile
@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 May 13, 2024 05:01
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 July 19, 2024 06:12
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 July 12, 2024 09:22
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
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active June 5, 2024 21:05
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