Skip to content

Instantly share code, notes, and snippets.

View UniDyne's full-sized avatar

D. Oliver Brown UniDyne

View GitHub Profile
@UniDyne
UniDyne / _README.md
Last active November 30, 2025 00:52
Xen / XCP-ng : Forward VM console session to local port for VNC access.

XCP-ng Easy VNC to VM Console

For people that are tired of manually looking up DOM ID, executing socat and establishing their SSH tunnel.

  • Edit connect_vm.sh to add the IP address of your XCP-ng host.
  • Ensure socat is installed on the host. If it isn't, use yum install socat
  • For best results, set up keys for SSH root login to our XCP-ng host.
  • Place the script forward_console.sh on the XCP-ng host, in /root.
  • Place the script connect_vm.sh locally on the computer you will VNC from.
  • Optionally, you may edit connect_vm.sh to launch your preferred VNC viewer.
@ear1grey
ear1grey / scale-example.js
Created November 1, 2017 14:39
Example of using context.scale in HTML5 canvas
let can = document.createElement('canvas');
let c = can.getContext("2d");
document.body.appendChild(can);
can.width = 300;
can.height = 500;
can.style = "border: dashed black thin;";
// Calculate scale value so that using dimensions
&scoped db
&scoped-define dfin WZ-DFIN
def var WZ-DFIN as char form "x(65)" init '{&db}.df'.
&scoped-define dfout WZ-DFOUT
def var WZ-DFOUT as char form "x(65)" init '{&db}area.df'.
update WZ-DFIN WZ-DFOUT.
&scoped csvfile '{&db}area.csv'
&scoped filefield 1
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/