View test_deref.rs
use std::ops::Deref;
struct DerefExample<T> {
value: T
}
impl<T> Deref for DerefExample<T> {
type Target = T;
fn deref(&self) -> &T {
View token_tree.rs
enum Literal { Int(i32), }
enum Term<'a> { OpTree(&'a OpTree<'a>), Literal(Literal) }
enum OpType { Add, Sub, Mul, Div }
struct OpTree<'a>(OpType, Term<'a>, Term<'a>);
impl ToString for OpType {
fn to_string(&self) -> String {
View parser-combinator.rs
use std::error::Error;
use std::iter::FromIterator;
use std::fmt;
#[derive(Debug)]
struct ParseError {
message: &'static str,
}
impl ParseError {
View util.sh
#!/bin/sh
## @PosixCompatible
eecho() { echo "$*" > /dev/stderr; }
## @PosixCompatible
require_commands() {
(
missing=0
for cmd; do
View script.js
{
'use strict';
const engines = [];
engines.push(...document.querySelectorAll('list#default-search-engine-list div[role="listitem"]'));
engines.push(...document.querySelectorAll('list#other-search-engine-list div[role="listitem"]'));
engines.pop();
const data = engines.map(e => {
const [name, keyword, url] = Array.from(e.querySelectorAll('.static-text')).map(e => e.textContent);
return `# ${name}\n${keyword}: ${url}\n`;
}).join('\n');
View justyo.sh
#!/bin/sh
OPTSTRING='hp:l:'
ACCESSTOKEN_BASENAME='.yoaccesstoken'
ACCESSTOKEN_PATH="${HOME}/${ACCESSTOKEN_BASENAME}"
error() {
echo "$*" > /dev/stderr
exit 1
}
View chromepwd2csv.sh
# CREATE TABLE logins (origin_url VARCHAR NOT NULL,
# action_url VARCHAR,
# username_element VARCHAR,
# username_value VARCHAR,
# password_element VARCHAR,
# password_value BLOB,
# submit_element VARCHAR,
# signon_realm VARCHAR NOT NULL,
# preferred INTEGER NOT NULL,
# date_created INTEGER NOT NULL,
View keybase.md

Keybase proof

I hereby claim:

  • I am syusui-s on github.
  • I am syusui_s (https://keybase.io/syusui_s) on keybase.
  • I have a public key whose fingerprint is 0AC8 2BCD E410 214C 2116 2FB5 9E40 A52F 2CB9 BE6A

To claim this, I am signing this object:

View seccon_osaka_2016_solve_30000.rb
#!/bin/ruby
# ruby -e 'print ("A"*142)+"ffffffffebaa9441".scan(/../).reverse.map{|e| e.to_i(16).chr }.join()' | ./1407.exe
# ruby -e 'def f(s); s.scan(/../).reverse.map{|e| e.to_i(16).chr }.join(); end; print ("A"*142) + f("ffffffffebaa9441") + "\x08\x02@\x00\x00\x00\x00\x00"' | ./1407.exe
def objdump()
objdump = `objdump -M intel -d "#{ARGV[0]}"`
parsed = objdump.each_line.map{|l|
l = l.gsub(/^\s+/, "").chomp.split(/\s*\t/)
l[0] = l[0].delete(':') if l[0]
next l
View list_systemcall.sh
for i in $(cat /usr/include/asm/unistd_32.h | grep NR | sed 's/^.*__NR_\([^ ]*\).*/\1/g');do
echo -e "$i"; echo -n "\t";
man 2 $i | grep -B2 SYNOPSIS | head -1 | tail -2 | sed 's/[^-]* - \(.*\)$/\1/';
done | less