Skip to content

Instantly share code, notes, and snippets.

Somewhat *not* developing games as a job

Jeremy Lam aka. Vistanz JLChnToZ

Somewhat *not* developing games as a job
Block or report user

Report or block JLChnToZ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JLChnToZ / bsod.ps1
Last active Dec 7, 2019
Simple PowerShell script that gives you BSOD
View bsod.ps1
$winId = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$winPrincipal = New-Object System.Security.Principal.WindowsPrincipal($winId)
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
If (-Not $winPrincipal.IsInRole($adminRole)) {
$cmdArgs = '-File', $MyInvocation.MyCommand.Path, '-ExecutionPolicy', 'Bypass'
Start-Process 'PowerShell' $cmdArgs -Verb RunAs
$memberDef = @'
[DllImport("ntdll.dll", SetLastError = true)]
View quine.js
var c=String.fromCharCode,s='var c=String.fromCharCode,s=#%#;console.log(s.replace(new RegExp(c(35),c(103)),c(39)).replace(c(37),s))';console.log(s.replace(new RegExp(c(35),c(103)),c(39)).replace(c(37),s))
JLChnToZ / _mishiro-version-code.txt
Last active Dec 26, 2018
If 346 characters are used as development code names of some software, this might be the best ordering
View _mishiro-version-code.txt
v1.0 ANZU (双葉杏)
v2.0 CATHY (キャシー・グラハム)
v3.0 DOMYOJI (道明寺歌鈴)
v4.0 ETOU (衛藤美紗希)
v5.0 FUMIKA (鷺沢文香)
v6.0 HAJIME (藤原肇)
v7.0 IBUKI (小松伊吹)
v8.0 JOUMU (美城常務)
v9.0 KAEDE (高垣楓)
v10.0 LAYLA (ライラ)
View dndtabs.mod.js
(function(containerQuery, childrenQuery) {
let dragging;
const container = document.querySelector(containerQuery);
container.addEventListener('dragstart', e => {
if(! return;
const { dataTransfer, target } = e;
dataTransfer.setData('application/x-tab-data', target.outerHTML);
JLChnToZ / PersistentCallFinder.cs
Last active Nov 8, 2018
A simple editor tool that writes all persistent calls into a stub file
View PersistentCallFinder.cs
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEditor;
using UnityObject = UnityEngine.Object;
View http-wol-proxy.ts
import { createSocket, Socket } from 'dgram';
import { isIP } from 'net';
import { createServer } from 'http';
import { URL } from 'url';
import { lookup as dnsLookup } from 'dns';
import { unescape as unescapeQuery } from 'querystring';
import { promisify } from 'util';
const macAddressFormat = /[^0-9A-F]/g;
JLChnToZ / SelectionHistory.cs
Last active Aug 27, 2018
Selection History for Unity Editor
View SelectionHistory.cs
using UnityEditor;
using System.Collections.Generic;
public static class SelectionHistory {
private const string PREV_SELECTED_MENU = "Edit/Previous Selection %&LEFT";
private const string NEXT_SELECTED_MENU = "Edit/Next Selection %&RIGHT";
private const int SELECTION_HISTORY_MENU_PRIORITY = 200;
private const int MAX_HISTORY_COUNT = 10;
private static readonly LinkedList<int[]> prevSelected = new LinkedList<int[]>();
JLChnToZ /
Last active Jun 21, 2018
Simple bookmarklet that captures any webpage and save as png image using HTML5 technologies

Webpage Snapshot Bookmarklet

This is a simple bookmarklet that captures any webpage and save as png image using HTML5 technologies. Under the hood it uses HTML2Canvas to capture the webpage to canvas, then we convert the content inside this canvas element to image file.

You may copy the text below and save as bookmark. `javascript:!function()%7Bfunction%20e()%7Bthis&&this.parentNode&&this.parentNode.removeChild(this),html2canvas(document.body).then(function(e)%7Breturn%20new%20Promise(function(t)%7Be.toBlob(t)%7D)%7D).then(function(e)%7Bvar%20t=document.createElement(%22a%22);return%20t.href=URL.createObjectURL(e),!@#%5C$%25%5C%5E&%5C*%5C+%5C-='%22%5C,%5C.:;%5D+/g,%22%22)+%22_%22+(new%20Date).getTime()+%22.png%22,,new%20Promise(function(e)%7BsetTimeout(10,e,t)%7D)%7D).then(function(e)%7B0===e.href.indexOf(%22blob:%22)&&(URL.revokeObjectURL(e.href),e.href=%22###%22)%7D).catch(function(e)%7Bconsole.error(e)

JLChnToZ / global.d.ts
Last active Jun 6, 2018
Demo for workaround on writing tsx file without React but with Hyperscript.
View global.d.ts
declare module '__globals' {
type DomElement = Element;
type DeepPartial<T> = {
[K in keyof T]?: T[K] | DeepPartial<T[K]>;
type FreePartialProperties<T> = {
[K in keyof T]: DeepPartial<T[K]> & {
[key: string]: any;
JLChnToZ / syncgif.js
Created Jan 14, 2018
A little script for refreshing all gifs on a webpage to make them synchronized.
View syncgif.js
(function refreshGif(selector, images, srcs) {
var mode = !!srcs, i;
if(mode) {
for(i = 0; i < images.length; i++)
images[i].src = srcs[i];
var dummyGif = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
images = document.querySelectorAll((selector || '') + ' img[src$=\'.gif\']');
srcs = [];
You can’t perform that action at this time.