Skip to content

Instantly share code, notes, and snippets.

View legnoh's full-sized avatar
🏠
WFH

Ryoma Kai legnoh

🏠
WFH
View GitHub Profile
@legnoh
legnoh / NicochartImproved
Created July 29, 2012 23:16
Nicochart Improved @ninja
// ==UserScript==
// @name NicoChart Improved
// @namespace http://now.nicochart.jp/*
// @include http://now.nicochart.jp/*
// ==/UserScript==
var tmbs = document.getElementsByClassName('lazy-display');
for (var i = 0; i < tmbs.length; i++) {
var tmb = tmbs[i].parentNode;
tmb.setAttribute('target', '_blank');
tmb.setAttribute('onClick', 'this.parentNode.parentNode.parentNode.style.display = \'none\';');
@legnoh
legnoh / gist:4092477
Created November 17, 2012 01:29
Recognition of Character Code
$tags = get_meta_tags($res->url);
$headers = get_headers($res->url,1);
$ctype = $headers['Content-Type'];
if(preg_match('/utf-8|euc-jp|shift_jis|iso-2022-jp/iu',$ctype,$cset)){
switch($cset[0]){
case 'euc-jp':
case 'EUC-JP':
$tag_key = mb_convert_encoding( $tags['keywords'], 'UTF-8' , 'eucJP-win');
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@legnoh
legnoh / config
Created February 8, 2014 19:40
rbenv,CentOS6.5で作るredmine環境 ref: http://qiita.com/legnoh/items/835ad5d1fa06a333348e
Host legnoh
User root
HostName legnoh.jp
Port 10022
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
@legnoh
legnoh / gist:6c866adfa0854215c9c9
Created July 5, 2014 18:17
[AnimeTick][Unwatched] convert to 3column
div#tickets {
width: 999px!important;
}
div#tickets div.ticket_relative {
width: 329px;
float:left;
}
div#tickets div.ticket {
@legnoh
legnoh / file0.php
Last active September 21, 2015 04:09
GoogleIMEの辞書ファイル(*.txt)をMacの日本語IM用辞書ファイル(*.plist)に変換する ref: http://qiita.com/legnoh/items/517cc218f3d62ea409e0
<?php
// convert.phpとか適当に名前つけて保存してくだしあ
// ファイル名を引数から読込んで定義
$option = getopt('i:o:');
$filename_in = empty( $option['i'] ) ? "./名称未設定.txt" : $option['i'] ;
$filename_out = empty( $option['o'] ) ? "./IME辞書01.plist" : $option['o'] ;
// 存在確認して入力ファイルを開く
0.00::/"=== 1. 基本設定 ======================"
0.00::/position = "shita"
0.00::/default_time = 4.0
0.00::/scroll_time = 0.0
0.00::/lines_max = 5
0.00::/"=== 2. フォントの設定 ================"
0.00::/font_size = 16
0.00::/font_color = 0xFFFFFF
0.00::/font_bold = false
0.00::/font_fuchi = true
0::/"=== 1. 基本設定 ======================"
0::/position = "shita"
0::/default_time = 4.0
0::/scroll_time = 0.0
0::/lines_max = 5
0::/"=== 2. フォントの設定 ================"
0::/font_size = 20
0::/font_color = 0xFF0000
0::/font_bold = false
0::/font_fuchi = true
@legnoh
legnoh / 週報テンプレート.mddown
Last active August 20, 2016 03:35
週報テンプレート.md
やった
----
- hoge
課題
----
- hoge
@legnoh
legnoh / user.js
Created May 6, 2017 05:39
Y!SHP Descliber
// ==UserScript==
// @name Y!SHP Descliber
// @namespace http://www.legnoh.jp
// @version 0.1
// @description disable checkbox to desclibe Y!SHP mail
// @author legnoh
// @match https://order.shopping.yahoo.co.jp/cgi-bin/review-order*
// @grant none
// ==/UserScript==