Skip to content

Instantly share code, notes, and snippets.

@nscstjo
nscstjo / cloudflare_ipv6_ddns_for_routeros_v7.script
Last active September 1, 2024 11:42
Script for Mikrotik RouterOS v7 updating AAAA DNS record on CloudFlare
:local cftoken "YOUR_CF_TOKEN"
:local cfzoneid "YOUR_CF_ZONE_ID"
:local cfrecordid "YOUR_CF_RECORD_ID"
:local recordtype "RECORD_TYPE"
:local recordname "FULL_RECORD_NAME"
:local recordttl TTL_TIME
:local isproxied false
:local interfacev6prefix [/ipv6 address get [find interface=INTERFACE_NAME from-pool=POOL_NAME] address]
:local interfacev6addr [:pick $interfacev6prefix 0 ([len $interfacev6prefix] -3)]
@joshskidmore
joshskidmore / ubuntu-mate-gpd-micropc.sh
Created June 28, 2019 10:43
ubuntu-mate-gpd-micropc.sh
#!/usr/bin/env bash
# update
apt -y update
apt -y upgrade
apt -y dist-upgrade
# 5.2 mainline kernel
cd /tmp
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2-rc6/linux-headers-5.2.0-050200rc6_5.2.0-050200rc6.201906222033_all.deb
@lucaspg96
lucaspg96 / bot.py
Last active February 20, 2025 18:27
A python script to send messages to a telegram user. Useful to notify when long scripts are finished!
#This script is independet of lib or python version (tested on python 2.7 and 3.5)
import telegram
#token that can be generated talking with @BotFather on telegram
my_token = ''
def send(msg, chat_id, token=my_token):
"""
Send a mensage to a telegram user specified on chatId
chat_id must be a number!
@alicanalbayrak
alicanalbayrak / ffserver_conf
Created March 6, 2016 10:45
Example multicast-rtp streaming ffserver configuration
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 500000
CustomLog -
NoDaemon
#RTSPPort 7654
#RTSPBindAddress 0.0.0.0
@wonjohnchoi
wonjohnchoi / .gitignore
Last active May 16, 2023 05:49 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python File Server With Browse, Upload, and Authentication
README.html
@touilleMan
touilleMan / SimpleHTTPServerWithUpload.py
Last active April 23, 2025 09:52 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@ducas
ducas / Create-Administrator.ps1
Last active January 15, 2025 08:20
Create a local administrator account using PowerShell
$Username = "su"
$Password = "password"
$group = "Administrators"
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
if ($existing -eq $null) {
@kennedy
kennedy / BF888S_default_01012019.csv
Last active May 5, 2025 13:23
Baofeng BF888S default frequencies
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Skip Comment URCALL RPT1CALL RPT2CALL DVCODE
1 462.125000 0.000000 TSQL 88.5 69.3 023 NN FM 5.00 S
2 462.225000 0.000000 88.5 88.5 023 NN FM 5.00 S
3 462.325000 0.000000 88.5 88.5 023 NN FM 5.00 S
4 462.425000 0.000000 TSQL 88.5 103.5 023 NN FM 5.00 S
5 462.525000 0.000000 TSQL 88.5 114.8 023 NN FM 5.00 S
6 462.625000 0.000000 TSQL 88.5 127.3 023 NN FM 5.00 S
7 462.725000 0.000000 TSQL 88.5 136.5 023 NN FM 5.00 S
8 462.825000 0.000000 TSQL 88.5 162.2 023 NN FM 5.00 S
9 462.925000 0.000000 DTCS 88.5 88.5 023 NN FM 5.00 S
@m1ari
m1ari / RPI Streaming notes
Last active January 20, 2023 13:32
Stream raspberry pi camera over multicast and cope with raspivid exiting
This requires a couple of windows (or a screen/tmux session)
First create a fifo to use
mkfifo video.h264
In the first window start raspivid in the following way
while true; do raspivid -n -vf -hf -w 460 -h 270 -b 512000 -t 36000000 -o video.h264 -v; done
In the second window start vlc like:
cvlc video.h264 --sout "#duplicate{dst=std{access=udp,mux=ts,dst=239.255.1.2:1234}}" :demux=h264 --ttl 4 -I http --sout-keep -v --loop
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""