Skip to content

Instantly share code, notes, and snippets.

Avatar

sei0o inoue sei0o

View GitHub Profile
View installation.md
$ 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 Jan 5, 2018
34C3 CTF vim (rev easy)
View registers_dump.txt
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 Dec 14, 2017
Scrapbox to Markdown
View scrapdown.js
(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 Feb 4, 2017 — forked from anonymous/index.html
チュウニズムのネームプレートを生成する(手抜き) source http://jsbin.com/tulugi/19
View index.html
<!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 Dec 22, 2015
supervisorとpumaとnginx(SSL)のconfig
View puma.rb
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 Jul 30, 2015
プログラミングで苦労するところ
View p.md

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

  • Ruby: lake(湖)をrakeと書き間違える
  • OOP: インスタンラーメン
@sei0o
sei0o / file_delete.rb
Created Feb 8, 2015
ファイルを削除
View file_delete.rb
File.delete "filename.txt"
@sei0o
sei0o / file_create_write.rb
Created Feb 8, 2015
ファイル生成&書き込み
View file_create_write.rb
str = "hogehoge"
File.open "puyo.txt", "w" do |f|
f.write str
end
@sei0o
sei0o / erb_text.rb
Created Feb 8, 2015
ERBを単体で使う
View erb_text.rb
require 'erb'
str = "hello <%= sushi %>"
sushi = "japan"
erb = ERB.new str
erb.result binding
@sei0o
sei0o / ud.m
Last active Aug 29, 2015
NSUserDefaultsから取ってきたアレをalert
View ud.m
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を忘れない
];
You can’t perform that action at this time.