Skip to content

Instantly share code, notes, and snippets.

@ergoz
ergoz / youtubedownloader.scpt
Created April 16, 2025 03:26 — forked from aflores/youtubedownloader.scpt
AppleScript file to download youtube videos
(*
script to download videos from youtube using the youtube-dl program
you can paste this code in a ScriptEditor file or use it inside a
'Run AppleScript' block in an Automator Application
*)
set question to display dialog "Youtube URL to fetch?" default answer "" buttons {"Cancel", "Open in Browser", "Download"} default button 3
set pageURL to (text returned of result)
if pageURL is "" then return "No URL"
set choice to (button returned of question)
@ergoz
ergoz / optparsing_demo.zsh
Created April 16, 2025 01:58 — forked from mattmc3/optparsing_demo.zsh
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@ergoz
ergoz / radiolisten.lua
Created April 2, 2025 00:50 — forked from EasyBB1/radiolisten.lua
Radio Station listening for Freeswitch
-- Radio Station listening for Freeswitch
--
-- Dial Plan format
-- condition ^\*55(\d{2})$
-- action lua radiolisten.lua $1 shout (Argument 'shout' is optional)(You'll need mod_shout installed and loaded)
-- OR
-- action lua radiolisten.lua $1 vlc (Argument 'vlc' is optional)(If specified, you'll need mod_vlc installed and loaded)
--
-- radiostations.txt (see below for file format)
-- # Radiostation name
@ergoz
ergoz / conference.conf.xml
Created March 31, 2025 13:03 — forked from thehunmonkgroup/conference.conf.xml
ClueCon talk 2016 - Videoconferencing with Verto, example code/config/links/slides
<configuration name="conference.conf" description="Audio Conference">
<!-- Other conference config... -->
<profiles>
<profile name="video-mcu-stereo">
<!-- Other profile config... -->
<!-- Mux the inbound video streams into one outbound stream. -->
<param name="video-mode" value="mux"/>
<!-- Enable the live array, minimize outbound video encoding. -->
<param name="conference-flags" value="livearray-sync|livearray-json-status|minimize-video-encoding"/>
<!-- Use this video layout by default if no other is specified. -->
@ergoz
ergoz / conference.conf.xml
Created March 31, 2025 13:03 — forked from thehunmonkgroup/conference.conf.xml
ClueCon talk 2016 - Videoconferencing with Verto, example code/config/links/slides
<configuration name="conference.conf" description="Audio Conference">
<!-- Other conference config... -->
<profiles>
<profile name="video-mcu-stereo">
<!-- Other profile config... -->
<!-- Mux the inbound video streams into one outbound stream. -->
<param name="video-mode" value="mux"/>
<!-- Enable the live array, minimize outbound video encoding. -->
<param name="conference-flags" value="livearray-sync|livearray-json-status|minimize-video-encoding"/>
<!-- Use this video layout by default if no other is specified. -->
<?xml version="1.0"?>
<document type="freeswitch/xml">
<X-PRE-PROCESS cmd="set" data="local_address=$${local_ip_v4}"/>
<X-PRE-PROCESS cmd="set" data="sipnet_proxy=sipnet.ru"/>
<X-PRE-PROCESS cmd="set" data="sipnet_login=..."/>
<X-PRE-PROCESS cmd="set" data="sipnet_password=..."/>
<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/>
@ergoz
ergoz / convert-image.psm1
Created March 30, 2025 22:44 — forked from midoriiro/convert-image.psm1
Convert OCI image to LXC format
Function Convert-Image
{
Param (
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[string]$Tag,
[Parameter(Mandatory = $false)]
@ergoz
ergoz / Spamassassin rules description
Created March 18, 2025 23:34 — forked from ychaouche/Spamassassin rules description
Spamassassin rules description
1 AC_BR_BONANZA Too many newlines in a row... spammy template
2 ACCESSDB Message would have been caught by accessdb
3 ACCT_PHISHING_MANY Phishing for account information
4 AC_DIV_BONANZA Too many divs in a row... spammy template
5 AC_FROM_MANY_DOTS Multiple periods in From user name
6 AC_HTML_NONSENSE_TAGS Many consecutive multi-letter HTML tags, likely nonsense/spam
7 AC_POST_EXTRAS Suspicious URL
8 AC_SPAMMY_URI_PATTERNS10 link combos match highly spammy template
9 AC_SPAMMY_URI_PATTERNS11 link combos match highly spammy template
10 AC_SPAMMY_URI_PATTERNS12 link combos match highly spammy template
@ergoz
ergoz / install_pyenv_mac_zsh.rst
Created March 4, 2025 03:07 — forked from josemarimanio/install_pyenv_mac_zsh.rst
Installing pyenv on macOS for Zsh using Homebrew
@ergoz
ergoz / clone_gitlab_repos.sh
Created February 27, 2025 12:19 — forked from sizgiyaev/clone_gitlab_repos.sh
Clone all gitlab repos from the given organization
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="orgname"
BASE_PATH="gitlab_url"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"