Skip to content

Instantly share code, notes, and snippets.

View diff-wrapper.bat
@echo off
echo "C:\Program Files\WinMerge\WinMergeU.exe" "%2" "%5"
"C:\Program Files\WinMerge\WinMergeU.exe" "%2" "%5"
View csssort.pl
#!/usr/local/bin/perl
use strict;
use warnings;
my @properties = qw(
margin-top margin-right margin-bottom margin-left margin padding-top
padding-right padding-bottom padding-left padding border-top-width
border-right-width border-bottom-width border-left-width border-width
border-top-color border-right-color border-bottom-color border-left-color
@hail2u
hail2u / urlshorter.pl
Created Apr 12, 2009
provide URL shortening ability and template component for shortened URL to your "lovely" blosxom.
View urlshorter.pl
# Blosxom Plugin: urlshorter
# Author(s): Kyo Nagashima <kyo@hail2u.net>, http://hail2u.net/
# Version: 2009-04-15
# Documentation: See the bottom of this file or type: perldoc urlshorter
package urlshorter;
use strict;
use vars qw($link_element);
View odj.js
/**
* odj.js - On-Demand JavaScript
*
* Based on jsr_class.js:
* http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html
*
* License:
* Copyright (c) 2006 Kyo Nagashima <kyo@hail2u.net>
*
* Permission is hereby granted, free of charge, to any person obtaining
View upnp-control.pl
#!/usr/bin/perl
use strict;
use Data::Dumper;
use Net::UPnP::ControlPoint;
use Net::UPnP::Device;
my $output = <<"_DATA_";
upnp-control.pl - List, Add or Delete port mapping of your UPnP powered router.
View build.sh
#!/bin/sh
# build.sh - tiny bash script for packaging Firefox extension
# based on: http://kb.mozillazine.org/Bash_build_script
NAME=bookmark-all
DIRS="content locale skin"
FILES="LICENSE"
TEMP_DIR=build
View firefox-view-source-editor-wrapper.bat
@echo off
pushd %TEMP%
for /f "delims=" %%i in ('dir /b /od') do set x=%%i
"notepad.exe" %x%
exit
View hisher_gists.user.js
// ==UserScript==
// @name His/Her Gists!
// @namespace http://hail2u.net/
// @description Insert a link to his/her Gists page in his/her profile page.
// @include http://github.com/*
// @exclude http://github.com/*/*
// ==/UserScript==
// console.time("hisher_gists");
View blosxom.htaccess
# Rewriting example for: http://example.com/weblog/blosxom.cgi
DirectoryIndex index.html blosxom.cgi
RewriteEngine on
RewriteBase /weblog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ blosxom.cgi/$1 [L,QSA]
View firefox-extension-read-write-prefs.js
// Firefoxの拡張での設定の読み書き
// <script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
var stringPref = nsPreferences.copyUnicharPref("extensions.example.string", "test");
nsPreferences.setUnicharPref("extensions.example.string", stringPref);
var booleanPref = getBoolPref("extensions.example.boolean", true);
setBoolPref("extensions.example.boolean", booleanPref);
var integerPerf = getIntPref("extensions.example.integer", 123);
You can’t perform that action at this time.