Skip to content

Instantly share code, notes, and snippets.

@azu
azu / ldr_pin_feed.user.js
Created April 13, 2013 01:22 — forked from Constellation/ldr_pin_feed.user.js
fix toString issue
// ==UserScript==
// @name LDR Pin Feed
// @namespace http://d.hatena.ne.jp/Constellation/
// @description show pin items as feed
// @author Constellation
// @include http://fastladder.com/reader/*
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
(function(win){
//Configuration
@azu
azu / Rakefile
Created January 26, 2013 05:30 — forked from taktamur/Rakefile
use homebrew & v 3.2.1
# -*- coding: utf-8 -*-
# Rictyフォントを入れるための手順をまとめた、自分用のRakefileです。
# Ricty http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html
#
# Rakefileのフォーマット http://www.kyobashi.org/hf/RakeUserGuide/?RakefileFormat
#
# 2012/11/05 taktamur@gmail.com
# clean/clobberについては http://www2s.biglobe.ne.jp/~idesaku/sss/tech/rake/
require 'rake/clean'
@azu
azu / gist:4129748
Created November 22, 2012 06:55 — forked from mala/gist:4129717
NICOSパスワード8文字切り詰め制限祭りまとめ

平文でパスワード保存されていた?と推測する奴は頭がおかしいのでエンジニアやめろ。


まず事実関係

MUFGは、ID登録及び、ログインの際に、パスワード規定文字数を超えて「入力することができませんでした」と主張している。
http://www.cr.mufg.jp/corporate/info/pdf/2012/121120_01.pdf

リニューアル前の直近のログインフォームでは、password入力のinput要素に各提携先に応じたmaxlengthが設定されていて、

@azu
azu / test.html
Created April 6, 2012 07:10 — forked from anonymous/test.html
test
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style type="text/css">
body {
padding: 30px;
}
@azu
azu / find.ks.js
Created February 12, 2012 07:52 — forked from 958/find.ks.js
[keysnail]find plugin
// Info
let PLUGIN_INFO =
<KeySnailPlugin>
<name>Find</name>
<description>Find from KeySnail</description>
<description lang="ja">ページ内やすべてのタブをテキスト検索</description>
<updateURL>https://gist.github.com/raw/905297/find.ks.js</updateURL>
<iconURL>https://sites.google.com/site/958site/Home/files/find.ks.png</iconURL>
<author>958</author>
@azu
azu / strftime.js
Created June 3, 2011 06:01 — forked from mjackson/strftime.js
A strftime implementation for JavaScript Date objects.
// https://gist.github.com/765200
var strftime;
strftime = (function () {
var zeropad = function (n) {
return n > 9 ? n : '0' + n;
};
var shortDays = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];
var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title></title>
<script>
window.onload = function() {
alert("[" +document.getElementById('test')["textContent" || "innerText"] + "]");
}
</script>
key.setViewKey(['C-c', 'C-p'], function(ev){
var loc = getBrowser().contentDocument.URL;
var doc = frame = document.commandDispatcher.focusedWindow.document
|| gBrowser.contentWindow.document;
if(loc.match(/www\.amazon\./)){
asin = loc.split("/")[5];
r = doc.evaluate("//div[@class='buying']",doc,null,XPathResult.FIRST_ORDERED_NODE_TYPE, null);
list = r.singleNodeValue.textContent.split("\n");
var info = Array();
for(i=0; i<list.length; i++ ){
@azu
azu / nicovideo_createPanel.js
Created February 27, 2011 05:24 — forked from gifnksm/nicovideo_createPanel.js
ニコニコ動画のwatchページのタブを追加する関数(Firefox依存なし)
// http://blog.livedoor.jp/eeu/archives/55316335.html
var addClassName = function(el, className) {
var reg = new RegExp('(^| +)' + className + '($| +)');
if (!reg.test(el.className))
el.className += ' ' + className;
};
var removeClassName = function(el, className) {
var reg = new RegExp('(^| +)' + className + '($| +)');
el.className = el.className.replace(reg, ' ');
};
@azu
azu / gist:838345
Created February 22, 2011 07:44 — forked from mattn/gist:838338
(function(ns) {
var r = typeof window != 'undefined' ? window : this;
[].forEach.call(ns.split("×"), function(v) { r = r[v] = {} })
})("mattn×hasegawayosuke×tokuhirom")
mattn.hasegawayosuke.tokuhirom.Miyagawa = function() {
alert('×××')
}
mattn.hasegawayosuke.tokuhirom.Miyagawa()