Published May-13-2020
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
(* | |
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) |
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
# 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() { |
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
-- 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 |
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
<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. --> |
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
<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. --> |
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
<?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"/> |
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
Function Convert-Image | |
{ | |
Param ( | |
[Parameter(Mandatory = $true)] | |
[string]$Name, | |
[Parameter(Mandatory = $true)] | |
[string]$Tag, | |
[Parameter(Mandatory = $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
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 |
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
#!/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\")" |
NewerOlder