сперва настраиваем Ubuntu или Debian: подключение к серверу через терминал с SSH c логином от root
ssh root@ip_server
Обновляет систему
# Moved to https://github.com/hyunbinseo/blog/blob/master/posts/setup-ssh.md | |
### Preparation ############################################################### | |
# macOS bundled OpenSSH does not support FIDO. | |
# https://developer.apple.com/forums/thread/698683 | |
# https://github.com/apple-oss-distributions/OpenSSH/pull/1 | |
brew install openssh |
#!/bin/sh | |
# Remove the performance overlay, it meddles with some tasks | |
unset LD_PRELOAD | |
# Fetch Resolution | |
RES=$(xdpyinfo | awk '/dimensions/{print $2}') | |
# Apply Resolution in env and start a new nested gnome with a new dbus | |
env MUTTER_DEBUG_DUMMY_MODE_SPECS=$RES dbus-run-session -- gnome-shell --wayland --nested |
(* | |
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) |
# 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() { |
-- 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 |
<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. --> |
<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"/> |