Skip to content

Instantly share code, notes, and snippets.

View hokaccha's full-sized avatar

Kazuhito Hokamura hokaccha

View GitHub Profile
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<!--
DB Designer XML to Propel Schema XML
==== Author: Jonathan Graham <jkgraham@gmail.com>
==== Version: 0.5 (2008-01-25) (http://blog.tooleshed.com/?p=6)
(function() {
var today = new Date();
if (today.getDate() == 9 && today.getMonth() == 3) {
var head = document.getElementsByTagName('head')[0];
var style = document.getElementsByTagName('style');
for (var i = 0, len = style.length; i < len; i++) {
head.removeChild(style[0]);
}
var link = document.getElementsByTagName('link');
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple;
use JSON::XS;
my $file = shift;
my $json_text;
var Rollover = function(elem, suffix) {
// 初期化する
this.namespace = "Rollover"; // 名前空間
this.elem = elem; // ロールオーバーしたい要素
this.suffix = suffix || "_o"; // 接尾語
this.baseSrc = elem.getAttribute("src"); // 元画像のパス
this.overSrc = this.baseSrc.replace(/\.\w+$/, this.suffix + "$&"); // ロールオーバー後の画像
this.addEvent();
this.preLoad();
};
Class("Rollover", {
// プロパティの設定
has: {
namespace: {
is: "ro",
init: "Rollover"
},
elem: {
is: "rw"
},
if !has('ruby')
finish
endif
function! s:BlueCloth(line1, line2)
ruby << EOF
require 'rubygems'
require 'bluecloth'
firstline = VIM::evaluate('a:line1').to_i
function! g:Hatena(arg, line1, line2)
perl << EOF
use Text::Hatena;
my ($success, $firstline) = VIM::Eval('a:line1');
my ($success, $lastline) = VIM::Eval('a:line2');
my $base_text = join "\n", $curbuf->Get($firstline .. $lastline);
my $parse_text = Text::Hatena->parse($base_text);
function! VisualCurrentIndentBlock()
let current_indent = indent('.')
let current_line = line('.')
let current_col = col('.')
let last_line = line('$')
let start_line = current_line
while start_line != 1 && current_indent == indent(start_line - 1)
let start_line = start_line - 1
endwhile
" HTMLとかでドキュメントルートからの絶対パスのファイルを開く(gfみたいな感じで)
" 絶対パスじゃなかったら(/で始まってなかったら)gfと同じ
" ドキュメントルートのディレクトリは配列で複数指定できる。
let s:root_dirs = [$HOME.'/dev/site/localhost/test']
function! GotoAbsFile()
let filename = expand('<cfile>')
let filepath = filename
if (match(filename, '^/') != -1)
for dir in s:root_dirs
function! ZoomToggle()
let normal_font = 'Monaco:h12'
let zoom_font = 'Monaco:h25'
if &guifont == normal_font
let font = zoom_font
let columns = 78
let lines = 22
else
let font = normal_font
let columns = 180