Skip to content

Instantly share code, notes, and snippets.

NAKASHIMA, Makoto gifnksm

Block or report user

Report or block gifnksm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ldrnail.ks.js
// 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>
View phantom-lifetime.rs
struct Doc;
#[cfg(not(phantom))]
struct Node<'a> {
doc: &'a Doc
}
#[cfg(phantom)]
struct Node<'a>;
@gifnksm
gifnksm / README
Created Dec 22, 2009
ニコニコ動画でロックされているタグに★を表示する。海外タグ表示機能,複数タグによるタグ検索を支援する機能を搭載。
View README
http://github.com/gifnksm/nicovideo-add-stars-to-tags
に引っ越しました。
@gifnksm
gifnksm / fx_optimize_sqlite.ps1
Created Dec 22, 2009
Firefoxの全てのプロファイルディレクトリ以下の*.sqliteを最適化するPowershellスクリプト。
View fx_optimize_sqlite.ps1
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
@gifnksm
gifnksm / capture.sh
Created Dec 22, 2009
tcpdumpでパケットログをキャプチャし続けるシェルスクリプト
View capture.sh
#!/bin/bash
message()
{
echo "$(date +'%Y-%m-%d %T') " $@
}
touch_dir()
{
if [ ! -d $1 ]
then
View dollarX.js
// 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" : "";
});
}
View beginning-of-indented-line.el
(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))
@gifnksm
gifnksm / bookmark.css
Created Feb 2, 2010
ブックマークツールバーのテキストラベルを隠すユーザースタイル
View bookmark.css
@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;
}
View memoize.js
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]);
@gifnksm
gifnksm / e4xToDOM.js
Created Feb 8, 2010
E4XからDOMノードへ変換する (HTML用に余分な空白を混入させない)
View e4xToDOM.js
// 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");
You can’t perform that action at this time.