Skip to content

Instantly share code, notes, and snippets.

@mizchi
mizchi / real-world-virtual-dom.md
Last active September 3, 2015 18:09
Real World Virtual DOM 原稿

Real World Virtual DOM

React, Flux, Isormorphic… そして現実

  @mizchi / Increments Inc


自己紹介

class PixivImage
include Mongoid::Document
field :image_id
field :pixiv_user_id
field :title
field :tags, :type => Array
field :url
field :image_url
field :description
field :saved, :type => Boolean, :default => false
@hetima
hetima / 01_setMenuProxy.m
Created July 27, 2011 10:27
WebKit2 context menu hack
// based on http://d.hatena.ne.jp/uasi/20110722/1311275712
IMP orig_setMenuProxy;
// オリジナルの setMenuProxy: と差し替えるメソッド
void ST_setMenuProxy(id self, SEL _cmd, void *menuProxy)
{
// オリジナルのメソッドを呼んでやる
orig_setMenuProxy(self, _cmd, menuProxy);
// menuProxy は WebContextMenuProxyMac クラスのポインタ
@tily
tily / example.txt
Created August 3, 2011 08:52
マクガフィン自動生成
白い瓶に封じられたディスク
茶色のハンドバッグに隠されたセキュリティカード
赤いビニール袋に入ったIDカード
茶色のペットボトルに詰めこまれた宝の地図
赤い謎の像に入った地図
紫色のワインボトルに封じられた証拠写真
金色の段ボール箱に厳重に保管された覚醒剤
銀色のコーラの空き缶に入っているフロッピーディスク
銀色のペンに入った覚せい剤
金色の空き缶に詰められたヘロイン
@hetima
hetima / (1)STWKClientHook.m
Created August 14, 2011 15:31
WebKit2 WKView client hook for Safari 5.1
//
// STWKClientHook.m
#import "STWKClientHook.h"
#import <objc/message.h>
struct STWKOrderedClientCluster{
struct WKPageLoaderClient loader;
struct WKPagePolicyClient policy;
struct WKPageFormClient form;
@VienosNotes
VienosNotes / CA.pl
Created December 15, 2011 06:25
1-Dimentional Cellular Automaton
use v6;
class CA {
has @.data;
has @.rule;
method new ($rule, $length, $population) {
my @data = (1 xx $population, 0 xx $length - $population).pick(*);
my @rule = $rule.fmt("%08b").flip.comb.map({.Int});
self.bless(*, data => @data, rule => @rule);
@mala
mala / aaa.md
Last active November 13, 2015 04:34
Plack::Middleware::Session::Cookie で secret未指定の場合のremote code executionについて
@guillermo
guillermo / my_app.sh
Created January 15, 2014 08:27
This is a unix wrapper around the erlang vm.
#!/bin/bash
# This is a unix wrapper around the erlang vm. It provides the following functionality:
#
# * Spawns in foreground
# * Handle SIGHUP and call RELOADFUNC
# * Handle SIGTERM SIGQUIT and SIGINT telling to the vm to quit
# * Dies if the vm dies (for example kernel killing because out of memory)
#
# Forks and improvements are welcome.
@mala
mala / gist:fad5e0bc8a82a9c0fc9d
Last active December 29, 2016 18:02
AFNetworking 2.5.2 以下の脆弱性について

未修正のアプリが数多く残っている状態なので、パブリックな場所での言及には注意して下さい

未修正のアプリが数多く残っている状況ですが、すでに広く情報が公開されており、2.5.2で修正されたという情報が広まると混乱が生じるため広く周知する次第です。

問題と経緯

AFNetworking 2.5.1 にMITM攻撃を許す脆弱性があり、2.5.2で修正された、 と報道されていますが、これは誤りです。

@mala
mala / gist:82074a542d703247a481
Created August 5, 2014 02:47
Storableからの任意コード実行脆弱性についての調査

Storableからの任意コード実行脆弱性についての調査

概要

  • HTTP::Cookies と DBI::ProfileDumperを使う
  • HTTP::Cookies は LWPの依存モジュールで、DBI::ProfileDumperはDBIに付属している。どちらもインストールされている可能性が非常に高い

HTTP::Cookies の autosave 機能で任意ファイルにcookiejarが保存される。 DBI::ProfileDumper もDESTROY時のflushでファイルに書きこむ。存在しているファイルへの追記であれば比較的自由なフォーマットでファイルに書き込み可能。