Skip to content

Instantly share code, notes, and snippets.

@theArina
theArina / rasdial.js
Created August 23, 2023 09:30
Node.js Rasdial module for broken native Rasdial on Windows 11 (22621.2134)
const ffi = require('ffi-napi'); // ^4.0.3
const ref = require('ref-napi'); // ^3.0.3
const wchar_t = require('ref-wchar-napi'); // ^1.0.3
const Struct = require('ref-struct-di')(ref); // ^1.1.1
const ArrayType = require('ref-array-di')(ref); // ^1.2.2
const Iconv = require('iconv').Iconv; // ^3.0.1
module.exports = (connectionName, userName, password) => {
const RASDIALPARAMS = Struct({
dwSize: ref.types.uint32,
@theArina
theArina / index.html
Last active January 14, 2022 07:35
electron-iframe-preload-bug-example
<!DOCTYPE html>
<html>
<body>
<webview
style="height:97vh"
src="https://www.eventbrite.com/e/built-to-spill-tickets-96116339559"
preload="./preload.js"
nodeintegrationinsubframes="true"
webpreferences="contextIsolation=no"
/>
@theArina
theArina / index.html
Created November 10, 2021 18:43
electron-14-webview-warning
<!DOCTYPE html>
<html>
<body>
<webview
style="height:97vh"
src="https://example.com"
webpreferences="nativeWindowOpen=no"
/>
</body>
</html>
@theArina
theArina / axs&e=38614969&t_locale=en-US.html
Last active July 21, 2021 12:35
slow-axs-redirection-example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
document.location = 'https://shop.axs.com/?c=axs&e=38614969&cid=en-US&t_locale=en-US&tsr=1626692742&tsh=0eb55650bd77341f3eebc133facbe785545956724b35e422fd9193814ce891fc';
</script>
<style type="text/css">
body {
color: #000;
font-family: Arial,Helvetica,sans-serif;
<!DOCTYPE html>
<html>
<body>
<webview
src="about:blank"
preload="preload.js"
nodeintegrationinsubframes="true"
/>
</body>
<script>