Skip to content

Instantly share code, notes, and snippets.

View bouzuya's full-sized avatar

bouzuya bouzuya

View GitHub Profile
@bouzuya
bouzuya / README.md
Last active May 21, 2020 13:42
bbn-furikaeri

明日の下書き


これはなに

  • 高円寺.dev #3 用の資料 https://koenji.connpass.com/event/160886/
  • フロントエンド専門じゃない人向けの、フロントエンドの最先端〜やや未来の話です
  • このレイヤーでは Node.js を使うべき/使うと強いという部分がありますが、他言語を否定しているわけではありません。むしろ他言語でこのアーキテクチャを模倣してほしいという話です。
@fnky
fnky / ANSI.md
Last active November 16, 2024 21:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@bouzuya
bouzuya / bouzuya_keycode.h
Created February 10, 2018 06:40
Nyquist Keymap
#include "action_layer.h"
#include "keymap_jp.h"
#define _____ KC_TRNS
#define _NOOP KC_NO
#define XXXXX KC_NO
#define _MO1_ MO(L1)
#define _MO4_ MO(L4)
#define _MO5_ MO(L5)
#define _TO0_ TO(L0)
@bouzuya
bouzuya / keymap.c
Last active September 9, 2019 09:26
ErgoDox EZ bouzuya v23
// ErgoDox EZ keymap v23
// #define IGNORE_MOD_TAP_INTERRUPT
#include "ergodox.h"
#include "action_layer.h"
#include "keymap_jp.h"
#define L0 0
#define L1 1
#define L2 2
#define L3 3
@arkadiyt
arkadiyt / writeup.md
Created August 30, 2017 03:24
Rubygems vulnerability writeup

Rubygems blog post: http://blog.rubygems.org/2017/08/27/2.6.13-released.html

Ruby-lang blog post: https://www.ruby-lang.org/en/news/2017/08/29/multiple-vulnerabilities-in-rubygems/

1) "a DNS request hijacking vulnerability"

Description:

Rubygems supports a gem server discovery mechanism, where if you set your gem source as https://example.com, the gem client will do a SRV dns lookup on _rubygems._tcp.example.com to determine where it should send requests to. A MITM can intercept that dns request and return whatever server they want, forcing the gem client to download code from a malicious server.

The original code (~7.2s on my laptop).

import System.Random
import System.CPUTime

rainfall :: [Int] -> Int
rainfall xs = sum (zipWith (-) mins xs)
package jp.sample.android.lib.type;
import android.support.annotation.NonNull;
public final class SuccessFailure<Success, Failure> {
public interface SuccessResult<Success> {
void result(Success successResult);
}
@bouzuya
bouzuya / create-store.ts
Created September 4, 2016 02:18
Raynos/weakmap-shim create-store.ts
// Original: https://github.com/Raynos/weakmap-shim create-store
type StoreId = Object;
type Store = (obj: Object) => Object;
type Item = { _storeId: StoreId; valueOf: ItemValueOf; };
type ItemValueOf = (storeId?: StoreId) => Object | Item;
const createStore = (): Store => {
const storeId: StoreId = {};
return (obj: Object | Item): Item => {