Skip to content

Instantly share code, notes, and snippets.

@valen214
valen214 / PromiseWebworker.ts
Last active August 4, 2022 08:40
Typed Promise Webworker
// https://stackoverflow.com/a/37154736/3142238
function sanitizeThis(self: any){
// @ts-ignore
// console.assert(this === self, "this is not self", this, self);
// 'this' is undefined
"use strict";
// ==UserScript==
// @name video helper
// @version 1
// @grant none
// @updateURL https://gist.github.com/valen214/0c9ddc51fccbb28c3da30ce914193ac1/raw/6e3ed5d4a36cb583f4b187ca2e83e9065047ddda/video_helper.user.js
//
// ==/UserScript==
/*
// @match https://www.youtube.com/*
@valen214
valen214 / questions.json
Last active January 5, 2020 11:41
high school programming question
{
"java": {
"1": {
"title": "Basic I/O - Console",
"questions": [
{
"type": "mc",
"question": "Which of the following is the correct package import statement so that the following line <br />\n<pre>\nScanner scanner = new Scanner(System.in);\n</pre>\ncan compile without error?",
"options": [
"import java/util/Scanner",
0x0Dc21E86B2d83788e014b52119Ef340D2aeb888E
@valen214
valen214 / C_CPP_JAVA_JS.txt
Last active June 4, 2017 19:00
comment block switch
/*
This is now comment
/*/
executable code
/*****/
//* added a '/' at the front