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
// Info | |
let PLUGIN_INFO = | |
<KeySnailPlugin> | |
<name>LDRnail</name> | |
<description>LDRize clone with KeySnail</description> | |
<description lang="ja">LDRize を KeySnail で</description> | |
<iconURL>https://sites.google.com/site/958site/Home/files/ldrnail.png</iconURL> | |
<updateURL>https://gist.github.com/958/1369730/raw/ldrnail.ks.js</updateURL> | |
<author>958</author> |
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
struct Doc; | |
#[cfg(not(phantom))] | |
struct Node<'a> { | |
doc: &'a Doc | |
} | |
#[cfg(phantom)] | |
struct Node<'a>; |
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
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"); |
OlderNewer