Skip to content

Instantly share code, notes, and snippets.

View joeyboli's full-sized avatar
💭
I may be slow to respond.

Joey 😎 joeyboli

💭
I may be slow to respond.
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
@instantdreams
instantdreams / npm_restore.sh
Last active October 23, 2022 02:51
Restore NPM configuration from previously created backup
#!/bin/bash
# Script location : /srv/bin/npm_restore.sh
# restore_source : Folder name for restore
# npm_home : Location of nginx-proxy-manager installation
restore_source=/media/Backups/nginx-proxy-manager
npm_home=/srv/nginx-proxy-manager
# Import protected variables
source /srv/bin/.env
# Restore Items
@5kr1p7
5kr1p7 / LoFi_radio.md
Last active August 19, 2022 23:11
Background Music for Coding for Every Taste
@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active May 16, 2024 03:53 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@BusterNeece
BusterNeece / mkpascal_with_azuracast.liq
Last active June 20, 2022 21:13
Integrating the mkpascal audio processing script with AzuraCast.
# Custom Configuration (Specified in Station Profile)
# This script is customized from the original, which can be found here:
# https://github.com/mkpascal/mk_liquidsoap_processing/blob/master/process.liq
#
# It can be added to your station via `Utilities` > `Edit Liquidsoap Configuration`
# where it can then be pasted into the bottom-most open text area, before the broadcasts
# are sent out to the various sources.
# Audio Input --------------------->
@tsungtwu
tsungtwu / nginx_reverse_proxy.md
Created November 27, 2019 04:51 — forked from KavenTheriault/nginx_reverse_proxy.md
Configure Nginx Reverse Proxy as failover

Configure Nginx Reverse Proxy as failover

In this exemple of configuration, if the first server fail (proxy_connect_timeout) one time (max_fails), the second server will be used for 60s (fail_timeout).

The SSL certificate need to be configure on the ReverseProxy server AND the proxyied servers. You can use the same certificate and configurations on all servers.

To test the configuration you can change your host file to simulate the correct domain name.

Use the following tool to configure SSL with optimal configuration.

@jonguenther
jonguenther / pastebin.sh
Last active February 15, 2022 03:46 — forked from ktmud/pastebin.sh
Bash Script to upload files and data to Pastebin.com
#!/bin/sh
# Paste at Pastebin.com using command line (browsers are slow, right?)
# coder : Anil Dewani
# date : Novemeber 7, 2010
# revised on June 22, 2018 by Jonathan Guenther
# see README for more information (if I have time to create one...)
echo +--------------------------------------------+
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@freekrai
freekrai / demo.php
Last active April 21, 2024 00:42
PHP session-based rate limiter for APIs
<?php
date_default_timezone_set('America/Los_Angeles');
session_start();
include("ratelimiter.php");
// in this sample, we are using the originating IP, but you can modify to use API keys, or tokens or what-have-you.
$rateLimiter = new RateLimiter($_SERVER["REMOTE_ADDR"]);
$limit = 100; // number of connections to limit user to per $minutes
$minutes = 1; // number of $minutes to check for.