Skip to content

Instantly share code, notes, and snippets.

View sei0o's full-sized avatar

Seio Inoue sei0o

  • The University of Tokyo (eeic2023)
  • Tokyo, Japan (UTC+9)
  • 01:12 (UTC +09:00)
View GitHub Profile
@sei0o
sei0o / keybindings.json
Created August 27, 2019 23:50
VSCode shortcuts
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+k",
"command": "workbench.action.navigateEditorGroups"
},
{
"key": "alt+left",
"command": "workbench.action.navigateBack"
},
@sei0o
sei0o / ghidra_il2cppdumper_load..py
Created September 10, 2019 16:23
Ghidra scripts to load script.py which IL2CppDumper exported (forked from @worawit's one)
#TODO write a description for this script
#@author
#@category _NEW_
#@keybinding
#@menupath
#@url
#@toolbar
# forked from: https://gist.github.com/worawit/c8788723a667f990ba9aebe9d69f2fc4
# see also: https://github.com/ghidraninja/ghidra_scripts/blob/371da70c6589d6c8a689224bf8069a957e4daf8c/golang_renamer.py
@sei0o
sei0o / mute.rb
Created September 15, 2019 16:04
Mute 'em All
require 'twitter' # $ gem install twitter
# use your app's credentials
client = Twitter::REST::Client.new do |conf|
conf.consumer_key = ""
conf.consumer_secret = ""
conf.access_token = ""
conf.access_token_secret = ""
end
@sei0o
sei0o / remove.rb
Last active November 15, 2022 12:36
Use this snippet to remove your tweets.
require 'tweetkit'
require 'json'
client = Tweetkit::Client.new(
consumer_key: "",
consumer_secret: "",
access_token: "",
access_token_secret: ""
)
@sei0o
sei0o / cam.py
Last active October 21, 2020 00:06
Use EasyTello + OpenCV to obtain the video stream from Tello
from easytello import tello
import time
import cv2
# see: https://stackoveflow.com/questions/50916903
d = tello.Tello()
d.takeoff()
d.streamon()
@sei0o
sei0o / controller.py
Created November 17, 2020 06:01
CLI-based controllers for Tello
from easytello import tello
import cv2
import numpy as np
import time
# TELLO = False
TELLO = True
STEP = 50
d = tello.Tello()
import socket
import threading
import time
import cv2
from easytello.stats import Stats
class Tello:
def __init__(self, tello_ip: str='192.168.10.1', debug: bool=True):
# Opening local UDP port on 8889 for Tello communication
self.local_ip = ''
@sei0o
sei0o / kochi.fish
Created February 13, 2021 04:01
http://www.ge.kochi-ct.ac.jp/~kyozai/hennyu/ のフォルダを整理する
#!/bin/bash
set B $PWD
set DIR $PWD/www.ge.kochi-ct.ac.jp/~kyozai/hennyu
for year in (seq 100)[8..26]
wget --mirror --no-parent http://www.ge.kochi-ct.ac.jp/~kyozai/hennyu/h{$year}/
end
mv $DIR .
rm -rf www.ge.kochi-ct.ac.jp
@sei0o
sei0o / syllabus.js
Last active September 29, 2021 07:05
MCC移行後の高専カリキュラムを取得する
//
const fs = require("fs")
const path = require("path")
const puppeteer = require("puppeteer")
async function getSyllabus(browser, schoolId, departmentId, year, lang) {
const page = await browser.newPage()
const url = `https://syllabus.kosen-k.go.jp/Pages/PublicSubjects?school_id=${schoolId}&department_id=${departmentId}&year=${year}&lang=${lang}`
@sei0o
sei0o / config.fish
Last active December 6, 2021 11:26
some config
if status is-interactive
# Commands to run in interactive sessions can go here
end
zoxide init fish | source
alias ls=exa
xkbcomp ~/.Xkeymap $DISPLAY 2>/dev/null
function cl
cd $argv