Skip to content

Instantly share code, notes, and snippets.

@nzws
nzws / tmpl.js
Last active April 26, 2024 08:21
// Simple JavaScript Templating
// John Resig - https://johnresig.com/ - MIT Licensed
// Forked by @yuzulabo
(function(){
var cache = {};
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
@nzws
nzws / PRs-welcome.svg
Created July 6, 2018 09:34
KnzkDev/KnzkApp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nzws
nzws / knzk-music-script.user.js
Last active August 30, 2018 17:06
Knzk Music ユーザスクリプト版
// ==UserScript==
// @name Knzk_Music
// @namespace https://github.com/yuzulabo
// @version 1.1.0
// @description Knzk Music ユーザスクリプト版
// @author neziri_wasabi (yuzu_1203)
// @match https://knzk.me/*
// @license MIT License
// ==/UserScript==
@nzws
nzws / yuzubot.html
Last active November 19, 2017 15:00
一瞬で爆破した謎Bot😋😋😋 ※あかりちゃんの元々のコード
<script>
let token = "トークン";
let is_running = 0;
if (localStorage.getItem('is_running') == '1') is_running = 1;
let ws = new WebSocket("wss://knzk.me/api/v1/streaming/?access_token=" + token + "&stream=public:local");
ws.onmessage = function (message) {
let json = JSON.parse(JSON.parse(message.data).payload);
if (json['account']) {
//if (json['account']['username'] === json['account']['acct']) {