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)
  • 10:27 (UTC +09:00)
View GitHub Profile
@sei0o
sei0o / installation.md
Last active March 9, 2018 23:44
kirakira PBR
$ nasm kirakira_pbr.asm
$ sudo dd if=kirakira_pbr of=/dev/to/your/mbr/usb/partition bs=512 count=1

Use a USB memory which uses MBR (not UEFI).
dd rewrites your USB's PBR (boot loader); don't forget to save backup and play at your own risk!

@sei0o
sei0o / registers_dump.txt
Created January 5, 2018 05:31
34C3 CTF vim (rev easy)
6, 0, 「@」, f2"ayl^f0"cyl"Ayl^fh"Ayl^fj"Ayl^fG"gyl^fk"GylG$FY"Gy3l$F@"hylFh"Hyl260GY@"F10H
{}
6, 51, 「2」, "ayl^f0"cyl"Ayl^fh"Ayl^fj"Ayl^fG"gyl^fk"GylG$FY"Gy3l$F@"hylFh"Hyl260GY@"F10H
{}
6, 51, 「2」, ^f0"cyl"Ayl^fh"Ayl^fj"Ayl^fG"gyl^fk"GylG$FY"Gy3l$F@"hylFh"Hyl260GY@"F10H
{"a"=>"2"}
6, 0, 「@」, f0"cyl"Ayl^fh"Ayl^fj"Ayl^fG"gyl^fk"GylG$FY"Gy3l$F@"hylFh"Hyl260GY@"F10H
{"a"=>"2"}
6, 3, 「0」, "cyl"Ayl^fh"Ayl^fj"Ayl^fG"gyl^fk"GylG$FY"Gy3l$F@"hylFh"Hyl260GY@"F10H
{"a"=>"2"}
@sei0o
sei0o / scrapdown.js
Created December 14, 2017 05:14
Scrapbox to Markdown
(function() {
let result = ``
result += `# ${document.querySelector('.lines .line-title').innerText}\n`
let insideCode = false
let afterBlankLine = false
document.querySelectorAll('.lines .line:not(:first-child) .text > span:last-child').forEach((el, idx) => {
let ht = el.innerHTML
.replace(/<span class="c-(\d+)( empty-char-index)?"( style="")?>(.)<\/span>/g, '$4') // normal text
@sei0o
sei0o / index.html
Last active February 4, 2017 04:39 — forked from anonymous/index.html
チュウニズムのネームプレートを生成する(手抜き) source http://jsbin.com/tulugi/19
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Chunithm Nameplate</title>
<style id="jsbin-css">
body {
font-family: 'Helvetica Neue', 'メイリオ', sans-serif;
}
@sei0o
sei0o / puma.rb
Last active December 22, 2015 10:19
supervisorとpumaとnginx(SSL)のconfig
root = Dir.getwd.to_s
bind "unix://#{root}/tmp/puma/socket"
pidfile "#{root}/tmp/puma/pid"
state_path "#{root}/tmp/puma/state"
rackup "#{root}/config.ru"
threads 4, 8
activate_control_app
@sei0o
sei0o / p.md
Created July 30, 2015 14:05
プログラミングで苦労するところ

プログラミングで苦労するところ

  • Ruby: lake(湖)をrakeと書き間違える
  • OOP: インスタンラーメン
@sei0o
sei0o / file_delete.rb
Created February 8, 2015 01:46
ファイルを削除
File.delete "filename.txt"
@sei0o
sei0o / file_create_write.rb
Created February 8, 2015 01:33
ファイル生成&書き込み
str = "hogehoge"
File.open "puyo.txt", "w" do |f|
f.write str
end
@sei0o
sei0o / erb_text.rb
Created February 8, 2015 01:12
ERBを単体で使う
require 'erb'
str = "hello <%= sushi %>"
sushi = "japan"
erb = ERB.new str
erb.result binding
@sei0o
sei0o / ud.m
Last active August 29, 2015 14:05
NSUserDefaultsから取ってきたアレをalert
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
int value = [ud integerForKey:@"hogelo"]; // 値をとってくる
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"タイトルだお"
message: [value description] // int型をNSStringに変換するお 
delegate: nil
cancelButtonTitle: nil
otherButtonTitles: @"OK", nil // nilを忘れない
];