Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| var arr = { | |
| max: function(array) { | |
| return Math.max.apply(null, array); | |
| }, | |
| min: function(array) { | |
| return Math.min.apply(null, array); | |
| }, | |
| range: function(array) { |
| #!/bin/bash | |
| # settings | |
| # Login information of freenom.com | |
| freenom_email="main@address" | |
| freenom_passwd="pswd" | |
| # Open DNS management page in your browser. | |
| # URL vs settings: | |
| # https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id} | |
| freenom_domain_name="domain.name" |
ansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=local| /** | |
| * Converts an HTTP(S) url to a WS(S) URL | |
| * Example: | |
| * httpUrlToWebSockeUrl("http://www.example.com/") -> ws://www.example.com/ | |
| * httpUrlToWebSockeUrl("https://www.example.com/") -> wss://www.example.com/ | |
| * | |
| * @param {string} url | |
| * @return {string} | |
| */ | |
| function httpUrlToWebSockeUrl(url) |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "time" | |
| ) | |
| func listen(end chan<- bool) { |
| #!/bin/bash | |
| # ============================================================================= | |
| # Author: Chu-Siang Lai / chusiang (at) drx.tw | |
| # Filename: teams-chat-post-for-workflows.sh | |
| # Modified: 2024-07-22 11:44 (UTC+08:00) | |
| # Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows. | |
| # Reference: | |
| # | |
| # - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
| # - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/ |
| package main | |
| import ( | |
| "crypto/tls" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/user" |