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
http://github.com/gifnksm/nicovideo-add-stars-to-tags | |
に引っ越しました。 |
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
param ([switch]$force) | |
$appProfDir = join-path $env:appdata "Mozilla\Firefox\Profiles" | |
$localProfDir = join-path $env:localappdata "Mozilla\Firefox\Profiles" | |
# http://csharper.blog57.fc2.com/blog-entry-206.html | |
function global:Invoke-Process | |
{ | |
param ([string] $processPath, [string]$processArgs, [int]$timeoutMilliseconds = [System.Threading.Timeout]::Infinite) | |
trap |
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
#!/bin/bash | |
message() | |
{ | |
echo "$(date +'%Y-%m-%d %T') " $@ | |
} | |
touch_dir() | |
{ | |
if [ ! -d $1 ] | |
then |
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
// extend version of $X | |
function $exp (exp, ownerDocument) { | |
if (!ownerDocument) | |
ownerDocument = document; | |
return ownerDocument.createExpression(exp, function (prefix) { | |
var o = document.createNSResolver(context)(prefix); | |
if (o) return o; | |
return (document.contentType == "application/xhtml+xml") ? "http://www.w3.org/1999/xhtml" : ""; | |
}); | |
} |
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
(defun beginning-of-indented-line (current-point) | |
"インデント文字を飛ばした行頭に戻る。ただし、ポイントから行頭までの間にインデント文字しかない場合は、行頭に戻る。" | |
(interactive "d") | |
(if (minibuffer-window-active-p (get-buffer-window (current-buffer))) | |
(beginning-of-line) | |
(if (string-match | |
"^[ \t]+$" | |
(save-excursion | |
(buffer-substring-no-properties | |
(progn (beginning-of-line) (point)) |
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
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
#bookmarksBarContent toolbarbutton:not([container="true"]) label { | |
display: none !important; | |
} | |
#bookmarksBarContent toolbarbutton:not([container="true"]) image { | |
margin: 0 !important; | |
} |
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
// DOM要素を結合する。引数はScalaのmkString風 | |
Array.prototype.joinDOM = function() { | |
var [sep, head, tail] = [null, null, null], | |
arg = Array.map(arguments, convertToDOM); | |
switch(arg.length) { | |
case 0: break; | |
case 1: [sep] = arg; break; | |
case 3: [head, sep, tail] = arg; break; | |
default: throw new Error('invalid arguments'); |
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
Object.memoize = function(obj, defs) { | |
function add(key, getter) { | |
obj.__defineGetter__(key, function() { | |
delete this[key]; | |
return this[key] = getter.call(this); | |
}); | |
} | |
for (let key in defs) { | |
if (defs.hasOwnProperty(key)) { | |
add(key, defs[key]); |
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 (E4X)からDOM Nodeへの変換 | |
default xml namespace = "http://www.w3.org/1999/xhtml"; | |
function e4xToDOM(xml, xmlns) { | |
var pretty = XML.prettyPrinting; | |
// 余分な空白を混入させないように,prettyPrintingを一時的に無効にする | |
XML.prettyPrinting = false; | |
var doc = (new DOMParser).parseFromString( | |
'<root xmlns="' + xmlns + '">' + xml.toXMLString() + "</root>", | |
"application/xml"); |
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 ssh-start() { | |
eval `/usr/local/bin/ssh-start` | |
} | |
[ -e "${HOME}/.ssh/agent-env" ] && . "${HOME}/.ssh/agent-env" |
OlderNewer