Skip to content

Instantly share code, notes, and snippets.

View superbrothers's full-sized avatar
🌏
Working from the earth

Kazuki Suda superbrothers

🌏
Working from the earth
View GitHub Profile
function! ToggleJSLintHighlightErrorLine()
if g:JSLintHighlightErrorLine == 1
let g:JSLintHighlightErrorLine = 0
else
let g:JSLintHighlightErrorLine = 1
endif
JSLintUpdate
endfunc
autocmd FileType javascript nmap ,e :call ToggleJSLintHighlightErrorLine()<CR>
@charset "utf-8";
/*
* このファイルを編集して userChrome.css という名前で
* [プロファイルディレクトリ]/chrome/
* ディレクトリにコピーしてください。
*/
/*
* このファイルを使って Mozilla のユーザインターフェイスの見た目をカスタマイズ
* できます。デフォルト設定を上書きする場合は !important 宣言を使ってください。
// ==UserScript==
// @name expand tiqav on new twitter
// @namespace http://gist.github.com/742072
// @include http://twitter.com/
// @include http://twitter.com/#!/*
// ==/UserScript==
(function () {
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js");
#facebox {
position: absolute;
top: 0;
left: 0;
z-index: 100;
text-align: left;
}
#facebox .popup{
<!DOCTYPE html>
<html lang="ja">
<head>
<title>File API</title>
<meta charset="UTF-8">
</head>
<body>
<h1>File API</h1>
<div id="result">使用できない</div>
<script>
<?php
class A {
protected static $_a = 'a';
public static function get() {
return self::$_a;
}
}
var_dump(A::get()); // a
var Buffer = require('buffer').Buffer;
var Iconv = require('iconv').Iconv;
var iconv = new Iconv('cp932', 'UTF-8');
console.log(iconv.convert(new Buffer('こんにちは', 'binary')).toString());
// ==UserScript==
// @name test
// @namespace http://example.com/test
// @include http://*
// ==/UserScript==
(function () {
var elIcon = document.createElement('link');
elIcon.setAttribute('rel', 'shortcut icon');
elIcon.setAttribute('href', 'http://example.jp/favicon.ico');
// ==UserScript==
// @name tiqav dev
// @namespace http://dev.tiqav.com/userscripts/tiqav_dev.user.js
// @include http://localhost:3000/*
// ==/UserScript==
(function () {
var node, imgList = document.getElementsByTagName('img');
for (var i = 0, len = imgList.length; i < len; ++i) {
node = imgList.item(i);
var src = node.getAttribute('src');
NodeList.prototype.forEach = function (fun, thisp) {
return Array.prototype.forEach.call(this, fun, thisp);
};