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 February 10, 2024 21:38
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 April 19, 2024 12:35
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;
@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 May 2, 2024 01:27
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 
@erichelgeson
erichelgeson / sentry-docker.sh
Last active January 27, 2020 15:10
Sentry Docker
SENTRY_SECRET_KEY=longsecrethere
DOCKERPREFIX=eric
cat <<-EOF > requirements.txt
sentry-slack==0.5.0
EOF
cat <<-EOF > Dockerfile
FROM sentry:8.5-onbuild
EOF