Skip to content

Instantly share code, notes, and snippets.

@stil
stil / ProxmoxAutoType.js
Last active January 23, 2025 14:42
Auto type in noVNC (Proxmox)
(async () => {
const text = prompt("Enter text to type:");
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const input = document.getElementById("noVNC_keyboardinput");
const keydown = (key) => input.dispatchEvent(new KeyboardEvent("keydown", { key }));
for (let i = 0; i < text.length; i++) { keydown(text[i]); await sleep(50); }
})();
@edjdavid
edjdavid / file.md
Created October 13, 2022 12:45
Stream Windows webcam/desktop via RTSP

Can be used for streaming data (webcam or screen capture) from the Windows to WSL

Install

  1. Simple RTSP Server
  2. ffmpeg

Get the internal IP of WSL

Run from a WSL terminal

ip route list default | awk '{print $3}'
@diyfr
diyfr / teleport.md
Last active July 5, 2022 17:00
Configurer Teleport derrière Traefik

TELEPORT Un PAM open Source pour se connecter à des serveurs via le navigateur

https://goteleport.com/docs/

Serveur Teleport

Il faut ouvrir les ports de 3023 à 3027 sur la console azure

Ajouter dans un compose

version: '3.7'
@yvesh
yvesh / gist:64ec1f64e3c7c26497282b776348f662
Created December 19, 2019 11:49
Proxmox LXC Arch Linux Container with passed through GPU, KVM, sound, keyboard etc. (Xorg with amdgpu working), Looking Glass Host - Linux Main OS in a container
arch: amd64
cores: 24
features: fuse=1,mount=nfs;cifs,nesting=1
hostname: archxorg
memory: 64000
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=XX:XX:XX:XX:XX.XX,ip=dhcp,type=veth
ostype: archlinux
rootfs: local-zfs:subvol-100-disk-0,size=500G
swap: 512
lxc.autodev: 1
@jayvdb
jayvdb / RefreshEnv.sh
Last active February 4, 2022 07:01
chocolatey RefreshEnv for bash
function refreshenv
{
powershell -NonInteractive - <<\EOF
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
Update-SessionEnvironment
# Round brackets in variable names cause problems with bash
Get-ChildItem env:* | %{
if (!($_.Name.Contains('('))) {
@janeczku
janeczku / 00-cloud-config.yml
Last active December 2, 2024 01:28
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@tonnylitao
tonnylitao / SmartSpeed.swift
Last active July 5, 2022 05:15
Smart Speed like Overcast. Smart Speed means shorten the silence of audio for saving time.
do {
try audioPlayer = AVAudioPlayer(contentsOf: url)
audioPlayer.isMeteringEnabled = true
audioPlayer.enableRate = true
audioPlayer.prepareToPlay()
} catch let error as NSError {
print("audioPlayer error \(error.localizedDescription)")
}
audioPlayer.play()
@UniIsland
UniIsland / list-manually-installed-packages.sh
Created February 8, 2014 08:20
List all manually installed packages on a debian/ubuntu system
#!/bin/bash
## List all manually installed packages on a debian/ubuntu system
## manually installed means:
## 1. not pre-installed with the system
## 2. not marked auto-installed by apt (not dependencies of other
## packages)
## Note: pre-installed packages that got updated still needs to be
## filtered out.
@freeonterminate
freeonterminate / FMX.Log.pas
Last active August 29, 2015 13:55
FMX.Types.Log が色々ダメ(Log.d の実態が Log.i だったり、Windows だと出力されなかったり、TAG が全く意味が無かったり)なので作った。
{
最新版は github に引っ越しました
FMX.Log newest version moved to github.
https://github.com/freeonterminate/delphi/tree/master/FMXLog
}