Skip to content

Instantly share code, notes, and snippets.

View umq's full-sized avatar
😪
Zzz

Hirohisa Yamaguchi umq

😪
Zzz
  • Osaka, Japan
  • 22:24 (UTC +09:00)
View GitHub Profile
@umq
umq / wassr-https-hack.user.js
Created July 29, 2008 05:51
force https in wassr.{com|jp}
// ==UserScript==
// @name wassr-https-hack
// @description wassr.{jp|com} is not yet fully applies https
// @include http://wassr.com/*
// @include http://wassr.jp/*
// @include https://wassr.com/*
// @include https://wassr.jp/*
// @namespace http://slashdot.jp/~umq/
// @version 1.1
// ==/UserScript==
// ==UserScript==
// @name nikkei-pc-em-refs
// @namespace http://slashdot.jp/~umq/
// @description Notify old articles
// @include http://pc.nikkeibp.co.jp/article/*
// ==/UserScript==
(function(){
var node = document.evaluate(
'//span[@class="co_capS"]',
// ==UserScript==
// @name itpro-em-refs
// @description Be Careful ITpro
// @include http://itpro.nikkeibp.co.jp/article/*
// @namespace http://tt25.org/
// @version 1.0.3
// ==/UserScript==
(function(){
var node=document.evaluate('//div[@class="mediaSource" or @class="mediaSource2" or @class="txt8"]',
// ==UserScript==
// @name Amazon short URI
// @namespace http://www.misao.gr.jp/~koshian/
// @description Short URI for amazon.
// @include http://www.amazon.co.jp/*
// @include http://amazon.co.jp/*
// @include http://www.amazon.jp/*
// @include http://amazon.jp/*
// originally: http://userscripts.org/scripts/show/24846
// ==/UserScript==
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# dns/phreebird
# dns/phreebird/pkg-descr
# dns/phreebird/Makefile
@umq
umq / dns_primdns.shar
Created April 21, 2011 12:58
FreeBSD port skeleton for PrimDNS by ebisawa: https://github.com/ebisawa/primdns
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# ports/dns/primdns
# ports/dns/primdns/pkg-descr
# ports/dns/primdns/Makefile
@umq
umq / RotateDisplay.cs
Created May 23, 2011 12:44
Rotate secondary display with ChangeDisplaySettingsEx()
using System;
using System.Runtime.InteropServices;
namespace RotateDisplayTest
{
class RotateDisplay
{
static void Main(string[] args)
{
uint deviceID = 1; // zero origin (i.e. 1 means DISPLAY2)
@umq
umq / com.apple.TimeMachine.MachineID.plist
Created June 8, 2011 18:47
Machine ID file for ``TimeMachine'' under Mac OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.backupd.BackupMachineAddress</key>
<string>ff:ff:ff:ff:ff:ff</string>
<key>com.apple.backupd.HostUUID</key>
<string>00000000-0000-0000-0000-000000000000</string>
</dict>
</plist>
@umq
umq / gist:1051698
Created June 28, 2011 17:47
Microsoft Office Excel column number to name
Function ColNum2Name(Col As Long) As String
Dim C As Integer
Col = Col - 1 ' 1 -> A, 26 -> Z, 27 -> AA
If (Col >= 0) Then
While (Col >= 0)
C = Col Mod 26
Col = Col \ 26 - 1
ColNum2Name = Chr$(Asc("A") + C) + ColNum2Name
Wend
Else
@umq
umq / www_tinytinyhttpd-github.patch
Created February 18, 2012 05:50
Patch for FreBSD port www/tinytinyhttpd to fetch specified github revision.
--- www/tinytinyhttpd/Makefile 2009-11-04 17:14:14.000000000 +0900
+++ www/tinytinyhttpd-github/Makefile 2012-02-18 13:13:12.000000000 +0900
@@ -6,20 +6,33 @@
#
PORTNAME= tinytinyhttpd
-PORTVERSION= 0.0.9
+PORTVERSION= 0.0.11
CATEGORIES= www
-MASTER_SITES= http://cloud.github.com/downloads/mattn/tinytinyhttpd/ \