Skip to content

Instantly share code, notes, and snippets.

View tsuzu's full-sized avatar
:octocat:
Working/Studying from Home

Tsuzuki Tsuchiya tsuzu

:octocat:
Working/Studying from Home
View GitHub Profile
@tsuzu
tsuzu / hide-preview.user.js
Created July 8, 2023 03:36
Hide Try New Tweetdeck Preview
// ==UserScript==
// @name Hide Try New Tweetdeck Preview
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://tweetdeck.twitter.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
@tsuzu
tsuzu / wordle.cpp
Last active February 25, 2022 15:21
Wordle Solver
/*
The MIT License
Copyright 2022 Tsuzu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@tsuzu
tsuzu / tcc.sql
Created April 18, 2020 10:10
Add new permission for Catalina
# ~/Library/Application\ Support/com.apple.TCC/TCC.db
# or /Library/Application\ Support/com.apple.TCC/TCC.db
# the target TCC.db file differs for services
INSERT INTO access (
service,
client,
client_type,
allowed,
prompt_count,
@tsuzu
tsuzu / index.js
Last active April 29, 2022 15:24
Set the anime title as the page title for danime store
// ==UserScript==
// @name danime store title
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://animestore.docomo.ne.jp/animestore/sc_d_pc*
// @grant none
// ==/UserScript==
@tsuzu
tsuzu / statefulset.yaml
Created February 11, 2020 03:51
Template for GitHub Actions self-hosted runner on Kubernetes
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: github-actions-runner
spec:
serviceName: "github-actions-runner-svc"
replicas: 1
selector:
matchLabels:
app: github-actions-runner
@tsuzu
tsuzu / main.go
Created November 23, 2019 15:32
turing machine simulator
package main
import "fmt"
import "strings"
const (
Q0 = "q_0"
Q1 = "q_1"
Q2 = "q_2"
@tsuzu
tsuzu / Dockerfile
Created June 28, 2019 06:41
Ubuntu Docker image with sshd for VSCode Remote
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y openssh-server && \
mkdir /var/run/sshd && \
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \
echo "export VISIBLE=now" >> /etc/profile && \
echo 'root:root' | chpasswd
@tsuzu
tsuzu / keybase.io
Created December 1, 2018 12:43
keybase
### Keybase proof
I hereby claim:
* I am cs3238-tsuzu on github.
* I am tsuzu (https://keybase.io/tsuzu) on keybase.
* I have a public key ASCYuv6kMIuqtdFNRGP5Ztq1F36cwH4XgokuYfrcqfqKLwo
To claim this, I am signing this object:
@tsuzu
tsuzu / main.go
Created November 27, 2018 02:59
Ultra Fast XXX Generator
package main
import (
"image"
"image/color"
"image/color/palette"
"image/draw"
"image/gif"
"image/png"
"math"
@tsuzu
tsuzu / 074-1W183088.c
Last active November 17, 2018 16:30
Cプロ第2回大レポート
#include <stdio.h>
#include <math.h>
#define NEWTON_MAX_TIMES 20
#define EPS (1e-6)
#define DIFFERENTIAL_H (1e-4)
/* f(x) を定義する */
double Fx(double x, int pm /* 1 or -1 */) {
return x + pm * sqrt(1 - x * x) + 1./2;