In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
| import _winreg as reg | |
| import win32file | |
| adapter_key = r'SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}' | |
| def get_device_guid(): | |
| with reg.OpenKey(reg.HKEY_LOCAL_MACHINE, adapter_key) as adapters: | |
| try: |
| #!/bin/bash | |
| # Load active ports | |
| PORTS=`lsof -i | grep mosh-serv | cut -f2 -d":"` | |
| STATUS=`sudo ufw status` | |
| # Add Rules for new ports | |
| for PORT in $PORTS; do | |
| echo $STATUS | grep "$PORT/udp" > /dev/null |
| # -*- coding: utf-8 -*- | |
| """ | |
| simple calculator for time | |
| based on fourFn.py (pyparsing module examlple) | |
| """ | |
| from pyparsing import Literal,CaselessLiteral,Word,Combine,Optional,\ | |
| ZeroOrMore,Forward,nums,alphas | |
| import sys, operator |
| ######################## | |
| # UUID for SQLite hack # | |
| ######################## | |
| from sqlalchemy.types import TypeDecorator, CHAR | |
| from sqlalchemy.dialects.postgresql import UUID | |
| import uuid | |
| class GUID(TypeDecorator): |
| function mktemp { | |
| param ( | |
| [Parameter(mandatory=$false)]$Extension | |
| ) | |
| $randomfile = [System.IO.Path]::GetRandomFileName() | |
| if ($Extension) { | |
| $randomfile = [System.IO.Path]::ChangeExtension($randomfile, $Extension) | |
| } | |
| return Microsoft.PowerShell.Management\Join-Path ([System.IO.Path]::GetTempPath()) "$randomfile" | |
| } |
| # For recent versions of Ubuntu: | |
| - https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ | |
| # Docs: | |
| - https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls | |
| - https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference | |
| - https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | |
| - https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53 | |
| # Download ISO Installer: |
| unqualified-search-registries = ['docker.io'] | |
| [[registry]] | |
| prefix = "docker.io" | |
| location = "docker.io" | |
| [[registry.mirror]] | |
| prefix = "docker.io" | |
| # This will set the docker registry mirror of a chinese university. | |
| # DON'T use it unless you have a network connection issue and you trust the mirror provider. |
| import os | |
| import shutil | |
| import tempfile | |
| import re | |
| import sys | |
| import tkinter as tk | |
| from tkinter import filedialog | |
| from tkinter import messagebox | |
The Windows version of OpenSSH client doesn't include a ssh-copy-id command. I don't know why. If it does one day, then this gist can be ignored.
cmd.exe is not flexible enough for the required options.ssh-copy-id.ps1 to your Windows PC, or copy and paste its contents to a file of the same name.powershell .\ssh-copy-id.ps1 pi@raspberrypi.local). If you use a non-standard port add the parameter -port=nnnn. This should work with any Linux platform.If the script won't run, then run this command once
Set-ExecutionPolicy RemoteSigned CurrentUser