Skip to content

Instantly share code, notes, and snippets.

@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']) {
@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 / 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 / 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 / knzklive.md
Last active October 14, 2018 04:55
KnzkLive リリースノート

2018/10

  • 10/07: 超ベータ版をリリース
  • 10/07: 思いっきりXSSの脆弱性が見つかる、リアルタイム修正チャレンジ
    • 脆弱性の修正をしたら改悪と言われた、今年一番の謎w
  • 10/08: シェアボタン、説明文改行、Ctrl+Enterでコメントとか色々細かいのを追加した
  • 10/09: iOSに対応しようと思いHLSをサポート
    • しようと思ったらバックエンドうっごかね、まだ未サポート
  • 10/10: HLS、MPEG-DASHをサポート
    • どうやらFFMPEGが上手くインスコできてなかった、FFMPEGを許すな(許す)
  • トゥートゥーの日
function main() {
const data = GmailApp.search('label:to_radtech is:unread', 0, 100); //to_radtechを設定したラベル名に
var i = 0;
while (data[i]) {
var message = data[i].getMessages();
var p = 0;
while (message[p]) {
if (message[p].isUnread()) {
var content = "件名: " + message[p].getSubject() + "\n\n" + message[p].getBody();

@TIPKnzk 使用方法 / How to use

@tipknzk@knzk.me tip @[宛先 / account] [ポイント / point] (これより後は無視されます)

Example:

@tipknzk@knzk.me tip @Knzk@knzk.me 100 hello!!!
@nzws
nzws / fix-gist-padding.user.css
Created February 23, 2019 16:53
fix-gist-padding
@-moz-document domain("gist.github.com") {
.experiment-repo-nav.repohead.gisthead {
padding-left: 0;
}
}
@nzws
nzws / ffmpeg_is_kami.sh
Last active May 24, 2019 15:34
ffmpegのインスコくそ面倒ってまじ? - まじです。(ただし、(自分の知る限り)CentOSに限る)
# this script is required root.
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2
tar xjvf nasm-2.14.02.tar.bz2
cd nasm-2.14.02
@nzws
nzws / mastodon_development_for_mac.md
Created May 5, 2019 17:15
macでのMastodon開発環境構築のエラー対処集

想定したRubyのバージョンが入らない

まあ自分ぐらいしかやらかさないと思うけど一応...

どうもターミナルの設定にrubyとrbenvを紐付けるのを忘れるとシステムのrubyが優先されてしまいめちゃくちゃ古いので動いてしまうそう。
例えばfishなら、

vi ~/.config/fish/config.fish

して、