Skip to content

Instantly share code, notes, and snippets.

@grugq
grugq / gist:03167bed45e774551155
Last active April 15, 2025 11:22
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@mala
mala / aaa.md
Last active November 13, 2015 04:34
Plack::Middleware::Session::Cookie で secret未指定の場合のremote code executionについて
@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でファイルに書きこむ。存在しているファイルへの追記であれば比較的自由なフォーマットでファイルに書き込み可能。

@niw
niw / create_yosemite_bootable_disk.sh
Last active April 1, 2019 04:13
How to create a bootable install disk image from Install OS X 10.10 Developer Preview.app
# Since Contents/Resources/createinstallmedia command doesn't work, we need to manually create an disk image.
# Mount InstallESD.dmg
hdiutil mount /Applications/Install\ OS\ X\ 10.10\ Developer\ Preview.app/Contents/SharedSupport/InstallESD.dmg
# Create a temporary writable BaseSystem image.
hdiutil convert /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o rw.dmg
# Get required sectors for packages.
# You'll get these numbers.
@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.
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@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);
@laiso
laiso / gist:1217214
Last active October 29, 2020 18:18
[日記] 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
# 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
何ッ ()
もしも それ が 真実 なの ならば———
これ は 大変なことになるぞ! (いや?)\
まぁ…… いい…
ククク…… 見せてもらおうじゃないか…… ←\
旋律 の 傀儡師 の 実力とやらを! # TODO なぜだ!? 動く!?
@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;
@tily
tily / example.txt
Created August 3, 2011 08:52
マクガフィン自動生成
白い瓶に封じられたディスク
茶色のハンドバッグに隠されたセキュリティカード
赤いビニール袋に入ったIDカード
茶色のペットボトルに詰めこまれた宝の地図
赤い謎の像に入った地図
紫色のワインボトルに封じられた証拠写真
金色の段ボール箱に厳重に保管された覚醒剤
銀色のコーラの空き缶に入っているフロッピーディスク
銀色のペンに入った覚せい剤
金色の空き缶に詰められたヘロイン