Skip to content

Instantly share code, notes, and snippets.

View ymmt2005's full-sized avatar

Yamamoto, Hirotaka ymmt2005

View GitHub Profile
@kumagi
kumagi / byte_lock.cpp
Created July 22, 2014 12:55
byte_lockが速いとかいうので試してみた。やっつけ実装なのに60倍速い。
#include <pthread.h> // pthread_create/join
#include <sys/time.h> // gettimeofday
#include <stdio.h> // printf, perror
#include <stdlib.h> // exit
#include <stdint.h> // exit
#define _GNU_SOURCE 1
#include <sched.h> // sched_setaffinity
struct byte_lock {
byte_lock()
@ymmt2005
ymmt2005 / passphrase.py
Created April 24, 2012 16:36
pass phrase generator for Japanese
# -*- coding: utf-8 -*-
'''
パスフレーズがいいらしい
→ 日本人なんだから日本語フレーズがいいに決まっている
いい辞書ないかな
→ pubdic+
http://www.remus.dti.ne.jp/~endo-h/wnn/
平仮名→ローマ字
@gnue
gnue / git-export
Created June 13, 2012 04:00
git に export サブコマンドを追加する(tgz, tb2, zip, ディレクトリ出力も簡単)
#!/bin/bash
die() {
echo "$1" 1>&2
exit 1
}
usage() {
die "Usage: $(basename $0) [-o outfile] <tree-ish> [<path>...]"
}
@kazuho
kazuho / gist:5027236
Last active February 20, 2016 18:47
MessagePackの文字列型追加において、Extended型を導入する提案

#MessagePackの文字列型追加において、Extended型を導入する提案

本提案は https://gist.github.com/frsyuki/5022569 https://gist.github.com/frsyuki/5022460 において提案された「バイナリ型」の構造に変更を施すものである。

##解決しようとする問題

  • MessagePackへの拡張は今後行われないとしても、独自に拡張する提案が今後頻発しそう
  • 拡張フォーマットは、既存のMessagePackに対して後方互換にならない(なりようがない)ため、相互運用性を損なう可能性が高い。これが問題

##提案する手法

go 1.1 scheduler

where

src/pkg/runtime proc.c asm_*.s

design

@mala
mala / 0_medium_vuln_en.md
Last active August 24, 2023 14:04
Disclosure of a vulnerability that allows the theft of visitors' email addresses using Medium's custom domain feature / Mediumの独自ドメインプランを使って訪問者のメールアドレスが窃取できる脆弱性の開示

Disclosure of a vulnerability that allows the theft of visitors' email addresses using Medium's custom domain feature

Author: mala

Introduction

  • This article describes a vulnerability in a web service called Medium that allows you to steal visitors' e-mail addresses by using custom domain plan of Medium.
  • This is done as my personal activity and is not related to my organization.
  • I'm not a zero-day guy and this is simply the result of a failure of coordinated disclosure.
@hashrock
hashrock / diag.md
Last active February 26, 2024 05:51
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など
@ityonemo
ityonemo / test.md
Last active April 25, 2024 10:23
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)