echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RSYNC="/usr/bin/sudo /usr/bin/rsync" | |
DTIME=`date +"%Y%m%d"` | |
LOCATION=/mnt/backups/servers/$1/$DTIME | |
mkdir -p $LOCATION | |
rsync -avx \ | |
--rsync-path="$RSYNC" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ \.(?:ico|css|js|gif|jpe?g|png|webp|gif|svg|txt)$ { | |
proxy_pass http://node:3000; | |
proxy_hide_header Cache-Control; | |
add_header Cache-Control "public, max-age=31536000, immutable"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
parser: '@typescript-eslint/parser', | |
plugins: [ | |
'@typescript-eslint', | |
'react', | |
'react-hooks', | |
'prettier', | |
], | |
extends: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This method also works with wireless doorbells and other similar systems. | |
We're gonna need a RTL-SDR, which is basically a radio dongle and a cheap radio transmitter. | |
We will also need a microcontroller to interface with the transmitter, any Arduino would do it. | |
You can get one for less than 8$ on Ebay, a 433MHz radio transmitter for less than 1$ and any kind of arduino clone for less than 3$. | |
Let's start... | |
First you need to install the drivers for the RTL-SDR, the Arduino IDE if you don't already have it, | |
the Audacity Audio Analyser/Editor and finally a spectrum analyzer, you can use http://airspy.com/?ddownload=3130 SDR# or https://github.com/pothosware/pothos/wiki/Downloads GQRX in Windows and https://github.com/pothosware/pothos/wiki/Downloads GQRX on linux. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect, useCallback } from 'react'; | |
import { AppState, AppStateStatus } from 'react-native'; | |
const useAppState = () => { | |
const [appState, setAppState] = useState(AppState.currentState); | |
const handleAppStateChange = useCallback( | |
(nextAppState: AppStateStatus) => { | |
setAppState(nextAppState); | |
}, | |
[setAppState], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
server01: | |
image: containous/whoami | |
container_name: service | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https" | |
- "traefik.http.routers.whoami-http.rule=Host(`service.server.com`)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
traefik: | |
image: traefik:2.1 | |
container_name: reverse-proxy | |
command: | |
- "--api.insecure=true" | |
- "--providers.docker=true" | |
- "--providers.docker.exposedbydefault=false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
traefik: | |
image: traefik:2.1 | |
container_name: reverse-proxy | |
command: | |
- "--api.insecure=true" | |
- "--providers.docker=true" |