Skip to content

Instantly share code, notes, and snippets.

View ishowta's full-sized avatar
😛

iwatachan ishowta

😛
View GitHub Profile
@ishowta
ishowta / init.sh
Last active March 31, 2017 01:14
朝7:30にPCを自動起動させてニコ生の放送を再生する
#たぶんもともと入ってない
sudo apt install nkf jq
@ishowta
ishowta / calc_wer.sh
Last active November 8, 2017 03:59
Calc word error rate from two text
#!/bin/bash
# how to use:
# chmod +x ./calc_wer.sh
# ./calc_wer.sh A.txt B.txt
# needed: pip, mecab, asr-evaluation
# install example:
# sudo apt install mecab libmecab-dev mecab-ipadic-utf8
@ishowta
ishowta / code.js
Last active February 25, 2020 11:43
Make modelator only chat field in Youtube
timer = setInterval(function() {
frame = document.querySelector('#chatframe')
if(frame !== null){
contents = document.querySelector('#chatframe').contentDocument.querySelector('div#contents.style-scope.yt-live-chat-app')
chats = document.querySelector('#chatframe').contentDocument.querySelector('div#items.style-scope.yt-live-chat-item-list-renderer')
chats_scroller = document.querySelector('#chatframe').contentDocument.querySelector('#item-scroller')
if(contents !== null && chats !== null){
console.log("start")
clearInterval(timer)
modelatorChats = document.createElement('div')
@ishowta
ishowta / CodeWrapperSample.nim
Last active February 25, 2020 11:43
DI by macro
import macros, sugar, sequtils
import rationals
proc `//`[T: SomeInteger](num, den: T): Rational[T] = initRational(num, den)
proc `//`[T: not SomeInteger](num, den: T): auto = num / den
proc genReplacer(fromNode, toNode: NimNode): auto =
proc replacer(node: NimNode):NimNode =
if node.len == 0:
if node.kind == nnkIdent and node == fromNode:
@ishowta
ishowta / RemoveImageFromSoundcloud.js
Created July 2, 2019 16:09
Remove Artwork & Header From Soundcloud
function run(nodes){
nodes.forEach(function(node){
if(typeof node.querySelectorAll !== "function") return;
// Remove artwork
node.querySelectorAll("span.sc-artwork").forEach(function(e){e.remove()})
// Remove header
node.querySelectorAll("div.profileHeaderBackground__visual").forEach(function(e){e.remove()})
})
}
@ishowta
ishowta / RemoveRating.js
Last active February 25, 2020 11:39
Remove any rating display from Web
function run(nodes){
nodes.forEach(function(node){
if(typeof node.querySelectorAll !== "function") return;
document.querySelectorAll("*[class*=star]").forEach(function(e){e.remove()})
document.querySelectorAll("*[class*=rating]").forEach(function(e){e.remove()})
})
}
run([document])
@ishowta
ishowta / stringExtension.swift
Last active July 22, 2019 14:24
Swift string random access extension (fuckin' slow)
// Too bad extension. Bad I think it is the best way.
extension String {
subscript(index: Int) -> Character {
return self[self.index(self.startIndex, offsetBy: index)]
}
subscript(bounds: CountableRange<Int>) -> Substring {
return self[index(at: bounds.lowerBound)..<index(at: bounds.upperBound)]
}
@ishowta
ishowta / apex.py
Last active February 26, 2020 23:29
play media and hide game between Apex matching time
from scapy.all import *
from sys import exit
import sys
from ctypes import *
import win32gui, win32com.client
from enum import Enum
user32 = windll.user32
kernel32 = windll.kernel32
# definition
@ishowta
ishowta / dead_check.bat
Last active October 22, 2020 19:29
[WIP] Monitor iphone & quest battery dead
@echo off
set errmes=ARP エントリが見つかりませんでした。
set iphone=192.168.11.3
set quest=192.168.11.12
arp -d %iphone%
ping %iphone% -n 1 -w 10000
arp -a %iphone% > tmpfile
"config": {
"detectGlobalManagerConfig": false,
"detectHostRulesFromEnv": false,
"postUpgradeTasks": {
"commands": [],
"fileFilters": [],
"executionMode": "update"
},
"onboardingBranch": "renovate/configure",
"onboardingCommitMessage": null,