Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
//How much should we love JScript?
//Seriously Tho, I never thought I would get this far with WSH.
var FSO=WScript.CreateObject("Scripting.FileSystemObject");
function readBinaryFile(filename){
//var bin=WScript.CreateObject("ADODB.Stream");
/*bin.Type=1;
bin.Open();
bin.LoadFromFile(filename);
return bin.Read();*/
var file=FSO.getFile(filename);
/*
* This is a JavaScript Scratchpad.
*
* Enter some JavaScript, then Right Click or choose from the Execute Menu:
* 1. Run to evaluate the selected text (Ctrl+r),
* 2. Inspect to bring up an Object Inspector on the result (Ctrl+i), or,
* 3. Display to insert the result in a comment after the selection. (Ctrl+l)
*/
function getS(NUE){wosh=[];var l;Array.prototype.forEach.call((function(){var arr = [],nl=document.getElementsByClassName("botTitle");l=nl.length
for(var i = 0, n; n = nl[i]; ++i) arr.push(n);return arr.sort(function(a,b){return b.parentNode.parentNode.getElementsByClassName('botLVL')[0].childNodes[2].textContent-a.parentNode.parentNode.getElementsByClassName('botLVL')[0].childNodes[2].textContent})})(), function (a) {
@Kreijstal
Kreijstal / tts.user.js
Created June 16, 2020 20:51
change audio device tts
//This is to use here https://tts.cyzon.us/files/playground.html
//you have to use https
navigator.mediaDevices.getUserMedia({audio:{deviceId:undefined}}).then(()=>{navigator.mediaDevices.enumerateDevices().then(a=>console.log(a[9]));
var b=document.getElementById("result-audio");
b.setSinkId("communications");
b.play()
})
@Kreijstal
Kreijstal / atomicwrites.data
Last active March 15, 2019 07:07
Python wtf lol
/*
* MathQuill master http://mathquill.com
* by Han, Jeanine, and Mary maintainers@mathquill.com
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL
* was not distributed with this file, You can obtain
* one at http://mozilla.org/MPL/2.0/.
*/
@font-face {
/**
* The main bootstrap script for loading pyodide.
*/
var languagePluginLoader = new Promise((resolve, reject) => {
// This is filled in by the Makefile to be either a local file or the
// deployed location. TODO: This should be done in a less hacky
// way.
var baseURL = self.languagePluginUrl || 'https://iodide.io/pyodide-demo/';
baseURL = baseURL.substr(0, baseURL.lastIndexOf('/')) + '/';
@Kreijstal
Kreijstal / wg.gesucht.js
Last active March 10, 2019 19:08
wg gescuht
function parseDate(input) {
var parts = input.match(/(\d+)/g);
// note parts[1]-1
return new Date(parts[2], parts[1] - 1, parts[0]);
}
function parse(off) {
var OmeterMoneyText = off.children[0].children[0].children[0].children[1].innerText.trim();
var Ohref = off.children[0].children[0].children[1].children[0].children[0].children[0].href;
var Otitle = off.children[0].children[0].children[1].children[0].children[0].children[0].innerText.trim();
[
{
"name": "Start",
"initial": true,
"content": "Ding Dong! <br>\n\n\n\n![](https://dl.myket.ir/newresizing/resize/medium/png/icon/703419b4-869f-4ad1-a762-1b7a2bbe8298_.png)\n\n\"Oh, the doorbell. What a crazy dream I had. <br>\n\n\"Hello! I have a package for you. Please sign here. <br>",
"events": {
"Sign package!": "package signing",
"Don't sign package": "name checking"
}
},
@Kreijstal
Kreijstal / Usefull.nb
Last active February 24, 2018 16:21
Mathematica and fun!
(*So sometimes I just want to show something very fast and I want for mathematica to do it for me, so after tryng very hard I came up with this*)
(*Previews and evalueates an expression*)
preview[x_] :=
TraditionalForm[
Row[{TraditionalForm[HoldForm[x]], "=",
x}]]; SetAttributes[preview, HoldFirst]
a = {6, 3, 0};
b = {9, 6, 0};