This script demonstrates a possible issue whereby Windows Script Host will crash with an out-of-bounds exception when trying to access the global scope within JScript. This is a new bug that was introduced with a recent patch to the Scripting Host in Windows 10 and 11.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /********************************************************************** | |
| mergeCSV.js - Merge similar CSVs | |
| *********************************************************************** | |
| Copyright (C) 2015 D. Oliver Brown <unidyne AT gmail.com> | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| // this could be stored in a json file instead | |
| var mimetypes = { | |
| css: "text/css", | |
| gif: "image/gif", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getCanonicalJSON(obj) { | |
| if(typeof obj === 'object') { | |
| var keys = []; | |
| // get keys and sort them | |
| for(var k in obj) keys.push(k); | |
| keys.sort(); | |
| // append each kvp to string | |
| return '{' + keys.reduce(function(prev, cur, i) { | |
| return prev + (i>0?',':'') + '"' + cur + '":' + getCanonicalJSON(obj[cur]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| // this is the key function where all the magic happens | |
| function getSubclassDir() { | |
| // override prepareStackTrace | |
| // error.stack will be <CallSite>[] rather than <string> | |
| const original = Error.prepareStackTrace; | |
| Error.prepareStackTrace = function(err, stack) { return stack; }; | |
| // create a new error and use the stack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| # Stable Diffusion Embedding Converter | |
| This is a simple script that converts a `.pt` Textual Inversion embedding file to `.safetensors` format. Nothing more, nothing less. | |
| ## To Use | |
| ``` | |
| $ python convert_embedding.py embeddings/myembed.pt embeddings/myembed.safetensors |
For people that are tired of manually looking up DOM ID, executing socat and establishing their SSH tunnel.
- Edit
connect_vm.shto add the IP address of your XCP-ng host. - Ensure
socatis installed on the host. If it isn't, useyum install socat - For best results, set up keys for SSH root login to our XCP-ng host.
- Place the script
forward_console.shon the XCP-ng host, in/root. - Place the script
connect_vm.shlocally on the computer you will VNC from. - Optionally, you may edit
connect_vm.shto launch your preferred VNC viewer.