Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'| (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); } | |
| })(); |
| #!/bin/bash | |
| # On the 'donor' machine, boot a live linux ISO (Ubuntu or whatever) | |
| # and connect it to the internet. Then run these commands, which will | |
| # dump the contents to sprunge.us so you can retrieve them easily. Or | |
| # copy them manually, whatever. | |
| mkdir -p /tmp/MSDM | |
| cd /tmp/MSDM | |
| for f in SLIC MSDM; do |
Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'Il faut ouvrir les ports de 3023 à 3027 sur la console azure
Ajouter dans un compose
version: '3.7'| 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 |
Benchmarked on 2019/07/19
by SD SkyKlouD (https://sdsk.one/ | Twitter @_SDSkyKlouD)
| 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('('))) { |
| #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 | |
| 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() |
| #!/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. |