Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
ThinGuy / mikrotik.beep.music.sh
Last active January 24, 2025 13:54
Add music to mikrotik routers
/system script add dont-require-permissions=no name="Super=Mario-Bros" owner=admin policy=read source=":beep frequency=660 length=100ms;\n:delay 150ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=510 length=100ms;\n:delay 100ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=770 length=100ms;\n:delay 550ms;\n:beep frequency=380 length=100ms;"
/system script add dont-require-permissions=no name="Thunderstruck" owner=admin policy=read source=":local n11 63,66;\n:local n12 64,67;\n:local n21 71,69,68,69,68,66,68,64,66,63;\n:local n22 64,63;\n \n:local n11 (\$n11,\$n11);\n:local n12 (\$n12,\$n12);\n:local n1 (\$n11,\$n11,\$n12,\$n12);\n:local n2 (\$n21,\$n22,\$n22,\$n22);\n:local notes (\$n1,\$n1,\$n2,\$n2);\n \n:local ticks 2;\n:local speed 55ms;\n:local stacc 5ms;\n# Transposition \n:local transpose -48;\n# ============================== \n# Don't change this: \n:local frqtab 8372,8869,9397,9956,10548,11175,11839,12543
"""
Script to scrape FilmOn for all channels and returns as tvg m3u8.
Includes Channel Name, Logo, and Category.
URI is an example proxied stream from https://gist.github.com/rlaphoenix/e18170c950a917890823eb53777a15a0
as using the official URI will just expire, useless.
"""
import sys
import requests
from pathlib import Path
@rlaphoenix
rlaphoenix / iptv.py
Last active December 9, 2024 17:13
Various Python Flask API utilities for working with HLS/DASH/DRM streams.
from functools import wraps
import os
import re
import subprocess
from pathlib import Path
from typing import Literal
from urllib.parse import quote_plus, unquote_plus, urlencode, urljoin
from uuid import uuid4
import requests
@KuangyeChen
KuangyeChen / brew_install_all.bash
Last active July 3, 2022 00:56
Install all brew formulae and casks
#!/usr/bin/env bash
set -e
function log_section() {
printf "\033[0;32m==>\033[0m\033[1m ${*}\033[0m\n"
}
function log_warning() {
printf "\033[1mWARN\033[0m: ${*}\n"
@InfoTeddy
InfoTeddy / fix_steam_screensaver.c
Created May 22, 2022 06:58
Linux Steam client screensaver issue workaround LD_PRELOAD library, while letting games disable screensaver
/* SPDX-License-Identifier: MIT */
/*
* On Linux, Steam periodically calls SDL_DisableScreenSaver() so your
* screensaver doesn't work with the Steam client open even if you aren't
* playing a game, as described in
* https://github.com/ValveSoftware/steam-for-linux/issues/5607 .
*
* To fix this, LD_PRELOAD a library that replaces SDL_DisableScreenSaver()
* with a no-op if the executable calling it is Steam, but otherwise let it
@esseti
esseti / print_stk.lua
Last active November 20, 2024 20:27
Read sticky table of HA proxy from lua action
function dump_str(o)
-- transform a table into a string for the printing.
-- found it on google
-- better to use print_r from here http://www.arpalert.org/haproxy-scripts.html
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump_str(v) .. ','
@lachesis
lachesis / nws-forecast.py
Created May 18, 2022 21:14
NWS weather forecast, hourly for next 7 days
#!/usr/bin/python3
import datetime
import hashlib
import itertools
import os
import socket
from pprint import pprint
import dateutil.parser
import lxml.etree
@lachesis
lachesis / weather-discussion.py
Created May 18, 2022 21:11
NWS weather textual discussion
#!/usr/bin/python
import argparse
import re
import sys
import requests
def main():
SHOW_GROUPS = [
r'SYNOPSIS',
r'DISCUSSION',
@3hedgehogs
3hedgehogs / ansible-runner-with-module.py
Created May 17, 2022 16:10
Runn ansible module from python script and print cache
#!/usr/bin/env python
import io
import os
import json
import sys
import ansible_runner
def finished_callback(runner):
@Dominicus1165
Dominicus1165 / Install_Script.ps1
Last active February 28, 2024 09:30
Winget install script for Windows
<#
# 0. Windows 10 only: update "App Installer" on Windows Store
#
# 1. Win+X => A
# 2. cd C:\Users\xxx\Desktop or C:\Users\xxx\OneDrive\Desktop if you have OneDrive
# 3. Set-ExecutionPolicy Unrestricted
# 4. .\Install_Script.ps1
#>
<#