Skip to content

Instantly share code, notes, and snippets.

View mattn's full-sized avatar
🍛
I love curry 🍛

mattn mattn

🍛
I love curry 🍛
View GitHub Profile
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@mattn
mattn / gist:1408622
Created November 30, 2011 10:42
ctagsを最近のmingw32でビルドすると落ちる件のパッチ
--- mk_mingw.mak.orig 2011-11-30 19:39:33.180631500 +0900
+++ mk_mingw.mak 2011-11-30 19:41:43.156385100 +0900
@@ -7,7 +7,7 @@
REGEX_DEFINES = -DHAVE_REGCOMP -D__USE_GNU -Dbool=int -Dfalse=0 -Dtrue=1 -Dstrcasecmp=stricmp
-CFLAGS = -Wall
+CFLAGS = -Wall -fno-omit-frame-pointer
##DEFINES = -DWIN32 $(REGEX_DEFINES)
DEFINES = -DWIN32 $(REGEX_DEFINES) -DKANJI
@h-east
h-east / gist:1397800
Created November 27, 2011 16:48
break if input ":sav_l"
:sav_l
(gdb) bt
#0 do_write (eap=0x7fffedc07470) at ex_cmds.c:2512
#1 0x00000000004590d9 in ex_write (eap=0x7fffedc07470) at ex_cmds.c:2496
#2 0x000000000046a97a in do_one_cmd (cmdlinep=0x7fffedc07ae8, sourcing=0,
cstack=0x7fffedc07640, fgetline=0x47fd07 <getexline>, cookie=0x0)
at ex_docmd.c:2668
#3 0x000000000046804c in do_cmdline (cmdline=0x0, fgetline=
0x47fd07 <getexline>, cookie=0x0, flags=0) at ex_docmd.c:1122
@igrep
igrep / autoload-vimplayer.vim
Created November 22, 2011 03:03
Really thin wrapper of MPlayer for Vim editor. ref http://www.mplayerhq.hu/DOCS/tech/slave.txt
"Settings
let g:vimplayer_mplayer_extra_options = []
let s:vimplayer_pipe_mplayer = {}
function! vimplayer#play(...) abort
let vimplayer_filenames = a:000
if !empty(s:vimplayer_pipe_mplayer) "mplayer already playing something
call s:vimplayer_pipe_mplayer.stdin.write("quit\n")
@rblackwe
rblackwe / gist:1342982
Created November 6, 2011 14:51 — forked from briandfoy/gist:1342877
Perl regex escapes by version of their introduction
# compiled by Tom Christiansen
v1.0 \0, \0N,\0NN Match octal character up to octal 077.
v1.0 \N, \NN, \NNN Match Nth capture group (decimal) if not in charclass and that many seen, else (octal) character up to octal 377.
v4.0 \a Match the alert character (ALERT, BEL).
v5.0 \A True at the beginning of a string only, not in charclass.
v1.0 \b Match the backspace char (BACKSPACE, BS) in charclass only.
v1.0 \b True at Unicode word boundary, outside of charclass only.
v1.0 \B True when not at Unicode word boundary, not in charclass.
v4.0 \cX Match ASCII control character Control-X (\cZ, \c[, \c?, etc).
v5.6 \C Match one byte (C char) even in UTF‑8 (dangerous!), not in charclass.
@hail2u
hail2u / hatena-bookmark-count.js
Created October 31, 2011 07:30
a[rel="bookmark"]探してはてブのカウントをくっつける
/*!
* hatena-bookmark-count.js
*
* Copyright (c) 2011 Kyo Nagashima <[email protected]>
* This library licensed under MIT license:
* http://opensource.org/licenses/mit-license.php
*/
/*global jQuery, $ */
@sekimura
sekimura / .gitignore
Created September 6, 2011 07:06 — forked from pcardune/.gitignore
Facebook command-line client helper
.fb_access_token
.fbconsole.py
/*
* Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
@perusio
perusio / apache_killer.pl
Created August 20, 2011 16:24
Apache Killer by KingCope exploits mod_deflate vulnerability
#Apache httpd Remote Denial of Service (memory exhaustion)
#By Kingcope
#Year 2011
#
# Will result in swapping memory to filesystem on the remote side
# plus killing of processes when running out of swap space.
# Remote System becomes unstable.
#
use IO::Socket;
// {{{
// vi:set ts=8 sts=2 sw=2 tw=0:
// vim:fdm=marker fdl=0 fdc=0 fdo+=jump,search:
// vim:fdt=substitute(getline(v\:foldstart),'\\(.\*\\){\\{3}','\\1',''):
#define _GLIBCXX_HAS_GTHREADS 1
#define _GLIBCXX__PTHREADS 1
#define _POSIX_TIMEOUTS 1
#include <pthread.h>
inline bool
operator<(const pthread_t& lhs, const pthread_t& rhs) {