Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
| function FindProxyForURL(url, host) { | |
| // our local URLs from the domains below example.com don't need a proxy: | |
| // if (shExpMatch(host, "*.reddit.com")) { | |
| // return "DIRECT"; | |
| // } | |
| // URLs within this network are accessed through | |
| // port 8080 on fastproxy.example.com: | |
| if (dnsDomainIs(host, ".reddit.com") || dnsDomainIs(host, ".redditspace.com")) { | |
| return "SOCKS5 127.0.0.1:8082"; |
| #!/bin/bash | |
| # target: squid-openssl 4.13 with listener "http_port 127.0.0.1:3129 tproxy" | |
| # see also: | |
| # https://docs.kernel.org/networking/tproxy.html | |
| # https://blog.cloudflare.com/mmproxy-creative-way-of-preserving-client-ips-in-spectrum/ | |
| # https://latest.gost.run/en/tutorials/redirect/#forwarding-chain_1 | |
| # you might need to enable some iptables/nftables kernel modules: |
| javascript:(function() { | |
| function copyToClipboard(text) { | |
| if (window.clipboardData && window.clipboardData.setData) { | |
| /*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
| return clipboardData.setData("Text", text); | |
| } else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
| var textarea = document.createElement("textarea"); | |
| textarea.textContent = text; |
| package com.simlegate.saveresource; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| public class MainActivity extends Activity { | |
| public void onCreate(Bundle savedInstanceState) { |
| #!/bin/ash | |
| # OpenWrt cron job to check the connection and, if there is no connection, | |
| # reboot the Huawei E3272 modem using the hilink api. This script is optimized | |
| # for busybox and written in ash. | |
| # Put this script in /bin/check_connection and then: chmod +x /bin/check_connection | |
| # Then: crontab -e | |
| # */15 * * * * /bin/check_connection > /tmp/reboot_con.log 2>&1 | |
| f="/tmp/reboot_lock" | |
| if [ ! -f "$f" ]; then |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
| /* bling.js */ | |
| window.$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function (name, fn) { | |
| this.addEventListener(name, fn); | |
| } | |
| NodeList.prototype.__proto__ = Array.prototype; |
This assumes you have a Xiaomi Ants Smart Camera that still has the open RTSP enabled. I think newer firmware might remove this capability. If you Google enough you can find instructions on how to downgrade.
FFMPEG is where most of the magic happens. I use OSX and as such am a fan of using Homebrew to install free software. Here is my ffmpeg install command:
brew install ffmpeg --with-faac --with-fdk-aac --with-ffplay --with-fontconfig --with-freetype --with-frei0r --with-libass --with-libbluray --with-libcaca --with-libquvi --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-webp --with-x265
idea and some snippets taken from pascalpoitras' weechat config
/mouse enable
/secure passphrase <pass>
/secure set relaypass <pass>
/secure set bitlbeepass <pass>
/secure set bncaddrport