Skip to content

Instantly share code, notes, and snippets.

" reference
" http://subtech.g.hatena.ne.jp/cho45/20061010/1160459376
" http://vim.wikia.com/wiki/Mac_OS_X_clipboard_sharing
"
" need 'set enc=utf-8' and
" below shell environment variable for UTF-8 characters
" export __CF_USER_TEXT_ENCODING='0x1F5:0x08000100:14'
"
" Vim(Mac)
if has('mac') && !has('gui')
" .vim/ftplugin/javascript/flyquickfixmake.vim
setlocal makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary\ -nocontext\ -process\ $*
setlocal errorformat=%f(%l):\ %m
autocmd BufWritePost * silent make %
(function(window) {
// md5: http://www.onicos.com/staff/iz/amuse/javascript/expert/md5.txt
var md5_hex=(function(){var MD5_T=[0x00000000,0xd76aa478,0xe8c7b756,0x242070db,0xc1bdceee,0xf57c0faf,0x4787c62a,0xa8304613,0xfd469501,0x698098d8,0x8b44f7af,0xffff5bb1,0x895cd7be,0x6b901122,0xfd987193,0xa679438e,0x49b40821,0xf61e2562,0xc040b340,0x265e5a51,0xe9b6c7aa,0xd62f105d,0x02441453,0xd8a1e681,0xe7d3fbc8,0x21e1cde6,0xc33707d6,0xf4d50d87,0x455a14ed,0xa9e3e905,0xfcefa3f8,0x676f02d9,0x8d2a4c8a,0xfffa3942,0x8771f681,0x6d9d6122,0xfde5380c,0xa4beea44,0x4bdecfa9,0xf6bb4b60,0xbebfbc70,0x289b7ec6,0xeaa127fa,0xd4ef3085,0x04881d05,0xd9d4d039,0xe6db99e5,0x1fa27cf8,0xc4ac5665,0xf4292244,0x432aff97,0xab9423a7,0xfc93a039,0x655b59c3,0x8f0ccc92,0xffeff47d,0x85845dd1,0x6fa87e4f,0xfe2ce6e0,0xa3014314,0x4e0811a1,0xf7537e82,0xbd3af235,0x2ad7d2bb,0xeb86d391];var MD5_round1=[[0,7,1],[1,12,2],[2,17,3],[3,22,4],[4,7,5],[5,12,6],[6,17,7],[7,22,8],[8,7,9],[9,12,10],[10,17,11],[11,22,12],[12,7,13],[13,12,14],[14,17,15],[15,22,16]];var
% diff -u Portfile_old Portfile_new
--- Portfile_old 2008-01-03 20:51:15.000000000 +0900
+++ Portfile_new 2008-12-27 22:16:07.000000000 +0900
@@ -81,9 +81,9 @@
xinstall -d -m 755 ${destroot}${prefix}/lib
xinstall -m 755 ${worksrcpath}/libmigemo.1.1.0.dylib \
${destroot}${prefix}/lib
- cd ${destroot}${prefix}/lib
- system "ln -s ./libmigemo.1.1.0.dylib libmigemo.1.dylib"
- system "ln -s ./libmigemo.1.1.0.dylib libmigemo.dylib"
% diff -u Portfile_old Portfile_new
--- Portfile_old 2008-06-07 12:49:27.000000000 +0900
+++ Portfile_new 2008-12-27 22:37:04.000000000 +0900
@@ -19,8 +19,9 @@
configure.args --enable-gui=macvim --without-x --disable-gpm \
--with-features=huge --enable-multibyte \
--mandir=${prefix}/share/man --with-tlib=ncurses
-patchfiles-append patch-os_mac.h \
- patch-MMTextView.m patch-MMTextStorage.h patch-MMTextStorage.m
+patchfiles-append patch-os_mac.h
// ==UserScript==
// @name ldr smooth scroll
// @namespace http://relaxedcolumn.blog8.fc2.com/
// @description smoothing scroll for livedoor reader (ldr) and fastladder
// @include http://reader.livedoor.com/reader/
// @include http://reader.livedoor.com/public/*
// @include http://fastladder.com/reader/
// ==/UserScript==
//
# $Id: Portfile 44195 2008-12-23 18:48:45Z [email protected] $
PortSystem 1.0
name asciidoc
version 8.2.7
categories textproc
maintainers boeyms openmaintainer
description Formatter/translator for text files to numerous formats
long_description \
js <<EOM
commands.addUserCommand(["javascriptincontent", "jsc"],
"Run a JavaScript command in content context",
function (args)
{
try
{
let s = new Components.utils.Sandbox(buffer.URL);
s.window = content.window;
s.document = content.document;
@tsukkee
tsukkee / tabFx2Compatible.xml
Created April 16, 2009 12:55
Vimperator 2.3 patch for Tree Style Tab
<?xml version="1.0"?>
<!--
Firefox 2 compatible tab structure library for Firefox 3 or later
Usage:
<?xul-overlay href="tabFx2Compatible.xul"?>
lisence: The MIT License, Copyright (c) 2009 SHIMODA "Piro" Hiroshi
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/license.txt
original:
<?php
function array_unique_callback($array, $callback) {
return array_intersect_key($array, array_unique(array_map($callback, $array)));
}
function book_compare_func($book) {
return $book->get_title();
}
class Book