This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use JSON::XS; | |
my $file = shift; | |
my $json_text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class("Rollover", { | |
// プロパティの設定 | |
has: { | |
namespace: { | |
is: "ro", | |
init: "Rollover" | |
}, | |
elem: { | |
is: "rw" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if !has('ruby') | |
finish | |
endif | |
function! s:BlueCloth(line1, line2) | |
ruby << EOF | |
require 'rubygems' | |
require 'bluecloth' | |
firstline = VIM::evaluate('a:line1').to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |