This file contains hidden or 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
#!/usr/local/bin/ruby | |
# coding: utf-8 | |
require 'securerandom' | |
def rand_str(chars, length) | |
length.times.map { | |
chars[SecureRandom.random_number(chars.length)] | |
}.join('') | |
end |
This file contains hidden or 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
javascript:void(function(){document.getElementsByTagName("a")[5].onclick=new Function("goToSchool();document.getElementById('status3_1').style.color=(tired+Math.floor(level*15+20)>tiredMax)?'#FF0000':'#FFFFFF';return false;");document.getElementsByTagName("a")[12].onclick=new Function("sabotage();document.getElementById('status3_1').style.color=(tired+Math.floor(level*15+20)>tiredMax)?'#FF0000':'#FFFFFF';return false;");})() |
This file contains hidden or 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
# coding: utf-8 | |
Plugin.create(:show_home_on_boot) do | |
on_boot do | |
Plugin::GUI::Timeline.instance(:home_timeline).active! | |
end | |
end |
This file contains hidden or 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
# coding: utf-8 | |
def recurse(numbers, sum_val, weight): | |
if numbers == []: | |
return sum_val | |
sum_val += numbers[-1] * weight | |
return recurse(numbers[:-1], sum_val, int(3/weight)) | |
def cd_mod10_w31(numbers): | |
sum_val = recurse(numbers, 0, 3) |
This file contains hidden or 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
LV NEXT TOTAL | |
1 0 0 | |
2 400 400 | |
3 1000 1400 | |
4 1500 2900 | |
5 2000 4900 | |
6 3000 7900 | |
7 3600 11500 | |
8 4200 15700 | |
9 4800 20500 |
This file contains hidden or 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
:: Windows XP SP3で動作確認 | |
:: %FILENAME%: 更新日時を取得したいファイル名 | |
for %%i in (%FILENAME%) do echo 更新日時: %%~ti |
This file contains hidden or 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
javascript:(location.href=/nicovideo\.jp/.test(location.href)?"inico"+location.href:"inico://"+prompt().match(/^[a-z]{0,2}\d+$/))() |
This file contains hidden or 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
javascript:void(function(){Array.prototype.slice.call(document.getElementsByTagName('img')).map(function(j){if(j.parentNode.nodeName=='A'){var a=j.parentNode;var p=a.parentNode;Array.prototype.slice.call(p.removeChild(a).getElementsByTagName('img')).map(function(k){p.appendChild(k);})}})})() |
This file contains hidden or 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
#!/usr/bin/ruby | |
# ipv4aconv | |
# 先頭アドレスとアドレス個数の組み合わせからビットマスクを用いたアドレス範囲に変換 | |
# | |
# 標準入力から”a.b.c.d,n”のリストを読み取り,アドレス範囲を書き出す | |
require 'ipaddr' | |
def ipv4aconv(ip, num) |
This file contains hidden or 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
javascript:void(function(){var id=prompt("illust_id?");id?location.href="pixitail://org.cathand.pixitail/pixiv/"+id:void(0);}()) | |