Skip to content

Instantly share code, notes, and snippets.

View saschanaz's full-sized avatar
🏢
Working from office

Kagami Sascha Rosylight saschanaz

🏢
Working from office
View GitHub Profile
@saschanaz
saschanaz / dumway.user.js
Last active February 2, 2016 12:41
Detectable Shumway
// ==UserScript==
// @name Dumway
// @namespace Flash
// @include *
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
// From https://github.com/mozilla/shumway/issues/2317#issuecomment-163005209
@saschanaz
saschanaz / tssync.ps1
Created December 30, 2015 08:07
TypeScript Sync
Set-StrictMode -Version Latest
$CurrentTime = get-date -format yyyy-MM-dd-HH-mm-ss
Function Test-Admin { [bool]((whoami /groups) -Match "S-1-16-12288") }
Function Backup-Item($filename) {
if (Test-Path $filename) {
Rename-Item $filename $(Get-Backupname $filename $CurrentTime)
}
}
Function Get-Backupname($filename, $time) {
@saschanaz
saschanaz / arbpre.js
Created December 9, 2015 13:59
Arbitrary Precision
/*
Use:
new ArbPre("123456781234780123487234").mulS(1000);
new ArbPre("123456781234780123487234").mul(new ArbPre("6289304527348952893045206"))
*/
class ArbPre {
constructor(input) {
if (typeof input === "number") {
let nums = this._nums = [];
while (input > 0) {
@saschanaz
saschanaz / s4p3.js
Last active December 5, 2015 18:42
paiza
"use strict";
process.stdin.resume();
process.stdin.setEncoding('utf8');
// 自分の得意な言語で
// Let's チャレンジ!!
process.stdin.on('data', function (chunk) {
let items = chunk.split('\n');
let conditions = items[0].split(' ');
let rangeLength = parseInt(conditions[0]);
let attackLength = parseInt(conditions[1]);
@saschanaz
saschanaz / cancellable.js
Last active November 17, 2015 06:46
ES20xx cancellable function proposal
cancellable function foo() { // extends `async function` and introduces `queue` keyword
let b = queue bar(); // can be auto canceled by cancelling foo
b === cancellation // true when foo is canceled during bar call, otherwise false
await bac(); // will not be auto canceled
}
let baz = foo();
baz.cancel();
baz === cancellation // true, new `cancellation` variable for function cancellation
@saschanaz
saschanaz / gallery.js
Last active October 11, 2015 18:03
갤털
@saschanaz
saschanaz / closers_ep38.md
Last active August 29, 2015 14:18
미스틸테인 기준 클로저스 대사 텍스트 정오 문서

EP38. 위기의 강남

출동금지

김유정 - 넌 신경 쓰지 말고 그냥 내 지시에 따라 작전 구역1에 나가면 돼. 알겠지?

  1. 작전 지역 (음성과 차이)
@saschanaz
saschanaz / immersivetoon.user.js
Last active September 14, 2015 14:43
Immersive Toon
// ==UserScript==
// @name ImmersiveToon
// @namespace sn-immersive-toon
// @description Immersive Naver Webtoon
// @include http://m.comic.naver.com/*
// @version 1.3.3
// @grant none
// ==/UserScript==
document.addEventListener("DOMContentLoaded", () => {
@saschanaz
saschanaz / smarttoon_button.user.js
Last active August 29, 2015 14:13
Smarttoon Button
// ==UserScript==
// @name Smarttoon Button
// @namespace sn-smarttoon-button
// @include http://comic.naver.com/webtoon/detail.nhn?*
// @include http://comic.naver.com/webtoon/list.nhn?*
// @version 1.1
// @grant none
// ==/UserScript==
document.addEventListener("DOMContentLoaded", () => {
@saschanaz
saschanaz / chosuntoon.user.js
Last active August 29, 2015 14:13
The reduction of Chosun
// ==UserScript==
// @name The reduction of Chosun
// @namespace sn-chosun-webtoon-reducer
// @include http://comic.naver.com/webtoon/detail.nhn?titleId=642598*
// @version 1.1
// @grant none
// ==/UserScript==
(() => {
var reducer = document.createElement("style");