Skip to content

Instantly share code, notes, and snippets.

View co3k's full-sized avatar
🔞
"><s>'\

Kousuke Ebihara co3k

🔞
"><s>'\
View GitHub Profile
<?xml version='1.0' encoding="UTF-8"?>
<!-- Copyright (C) 2009 Brian "Beej Jorgensen" Hall <[email protected]> -->
<!-- TODO ==========================================================
fix header tables in FO, fop 0.95 giving tons of warnings
will images embed as SVGs properly with fop 0.95?
IPv6 chapter for IPv6-specifics
<?php
/*
CakePHP 1.3.5 と 1.2.8 以下に存在する PHP コード実行の脆弱性を使って攻撃する PHP スクリプト
# 解説は http://co3k.org/diary/12
Report: http://malloc.im/CakePHP-unserialize.txt
Original POC: http://malloc.im/burnedcake.pwy
<?php
header('Content-Type: text/plain');
$dir = new DirectoryIterator(ini_get('session.save_path'));
foreach ($dir as $file)
{
if ($file->isDot())
{
<?php
require_once 'Calendar/Month.php';
require_once 'Date/Holidays.php';
if (isset($argv[1])) {
$month = $argv[1];
} else {
$month = date('Ym');
}
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by w3m configure 0.5.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/w3m/0.5.2 --disable-image
## --------- ##
## Platform. ##
$ brew doctor
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libpng15.15.dylib
Unbrewed static libraries were found in /usr/local/lib.
@co3k
co3k / heavy-rotation-machine.py
Created May 16, 2011 11:16
iTunes で再生中のプレイリストのなかで「レートの低い」「あまり再生していない」曲を重点的に再生しまくるプレイリストを作成する Python スクリプト
from ScriptingBridge import *
iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
heavy_playlist = None
for playlist in iTunes.sources()[0].playlists().get():
if "HEAVY" == playlist.name():
playlist.delete()
break
@co3k
co3k / opInteractiveTaskTestHandler.class.php
Created May 16, 2011 12:43
対話型タスクのテストをする奴の書き殴り中実戦投入中の奴
<?php
class opInteractiveTaskTestHandler
{
public $cli, $t, $lastStatus, $resource = null;
public $pipes = array();
public $output = '';
public function __construct($t)
@co3k
co3k / list-commit-hash-from-ticket.php
Created June 24, 2011 08:48
バージョンに紐づいたチケットに紐づいたコミットのハッシュ値っぽい文字列をチケットのページから取ってくるやつ(こいつらのハッシュ値が意図通りのブランチに紐づいているかはちゃんと調べないとダメ)
<?php
$url = 'http://redmine.openpne.jp/versions/show/165';
function getCommitHashList($path)
{
$url = 'http://redmine.openpne.jp'.$path;
$text = file_get_contents($url);
<?php
// this script is public domain
$list_34 = array(
36, 40, 39, 43, 62, 73, 89,
86, 97, 106, 124, 125, 126,
127, 164, 169, 182, 196,
183, 119,
);