Skip to content

Instantly share code, notes, and snippets.

View rinsuki's full-sized avatar

rinsuki rinsuki

View GitHub Profile
// Please paste to browser console
(async () => {
const listIdRe = /\/web\/timelines\/list\/([0-9]+)/g.exec(location.pathname)
if (listIdRe == null) throw "Please open timeline of target list"
const listId = listIdRe[1]
const initialState = JSON.parse(document.getElementById("initial-state").innerText)
const token = initialState.meta.access_token
const myUserID = initialState.meta.me
const headers = { Authorization: "Bearer " + token }
import json
f = json.load(open("package.json", "r"))
packages = open("packages.txt", "r")
def sorted_dict(input):
r = sorted(input.items(), key=lambda x:x)
d = {}
for k, v in r:
d[k] = v
@rinsuki
rinsuki / niconico.frontend_id.csv
Last active August 25, 2022 23:49
ニコニコのfrontend_idっていっぱいありますよね
frontend_id おおまかなプラットフォーム 詳細
1 Google Androidアプリ https://play.google.com/store/apps/details?id=jp.nicovideo.android&hl=ja
2 Apple iOSアプリ https://apps.apple.com/jp/app/id307764057
3 Web(SP) ニコニコ動画 https://sp.nicovideo.jp/watch/sm9
6 Web(PC) ニコニコ動画 https://www.nicovideo.jp/watch/sm9 FlashもHTML5もいっしょ
8 Web アカウント設定 https://account.nicovideo.jp/my/account
9 Web(PC) 生放送 https://live.nicovideo.jp/
10 Web(SP) 生放送 https://sp.live.nicovideo.jp/
12 Web(PC) 生放送プレーヤー https://live2.nicovideo.jp/watch/lv321381734
16 Web ニコニコアプリ (ゲームがあるやつ) https://app.nicovideo.jp/
protocol HTMLNode {
func renderAsString() -> String
}
extension String {
func containsCheck(chars: [Character]) -> Bool {
for c in self {
for char in chars {
if char == c {
#!/usr/bin/env python3
import csv
import json
import sys
j = json.load(open("/please/replace/path/bitwarden_export_YYYYMMDDHHMMSS.json", "r"))
with open("./p.csv", "w") as f:
c = csv.writer(f)
for item in j["items"]:
@rinsuki
rinsuki / niconico-ios-comment-html5.py
Created December 20, 2018 22:03
iOS版ニコニコアプリのコメントレンダラをHTML5版の独自拡張に無理矢理対応したように見せかけるやつ
from mitmproxy import http
import xml.etree.ElementTree as ET
import re
# iOS版ニコニコはどうやら250件以上の投稿者コメントは処理しないよう
# def request(flow: http.HTTPFlow):
# if flow.request.host != "nmsg.nicovideo.jp":
# return
# print(flow.request.headers.get("content-type", ""))
// ==UserScript==
// @name シャニマスで右クリック画像コピーがおかしくなるやつなおす
// @namespace https://rinsuki.net
// @version 0.1
// @author rinsuki
// @match https://shinycolors.enza.fun/*
// @grant none
// @run-at document-start
// ==/UserScript==
@rinsuki
rinsuki / google.script.run.withPromise.js
Created July 11, 2018 02:53
Google Apps Script の google.script.run を Promiseで
google.script.run.withPromise = new Proxy({}, {
get(obj, name) {
return (...args) => new Promise((res, rej) => {
google.script.run.withSuccessHandler(res).withFailureHandler(rej)[name](...args)
})
}
})
// ==UserScript==
// @name AxiosInMastodonConsole
// @namespace https://rinsuki.net
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://mstdn.maud.io/web/*
// @match https://imastodon.net/web/*
// @match https://tuner.1242.com/web/*
// @grant none
@-moz-document url-prefix("https://www.google") {
a[href*="pinimg.com"] {
display: none;
}
}