Skip to content

Instantly share code, notes, and snippets.

Avatar

takuya@mori takuya

  • Osaka City Univ
  • Osaka,Japan
View GitHub Profile
View fio-config.txt
[global]
ioengine=libaio
iodepth=1
size=1g
direct=1
runtime=60
directory=${TARGET}
stonewall
[Seq-Read]
View readme.md
@takuya
takuya / update-unbound-blocklist.sh
Last active Jul 26, 2022
unboundのdnsブロッキングリストを更新する。
View update-unbound-blocklist.sh
#!/usr/bin/env sh
## @since 2020-05-15
## @last 2021-01-05
## @author takuya
## unbound にブロッキング
## ブロッキングするURLを定期的に更新する
function update_domain_lists(){
update280blocker
@takuya
takuya / jibun_login.js
Created Apr 23, 2019
じぶん銀行のログイン
View jibun_login.js
var jibun_login = function( id , password){
// id is like "57114-12345"
var crn = id.split(/-/);
var inputs = Array.apply(null, document.querySelectorAll("input[name^=fldLoginUserCRN]"));
var list = crn.map(function(e, i) {return [e, inputs[i]];});
list.forEach(function(e) {e[1].value = e[0]});
document.querySelector("input[type=password]").value = password;
document.querySelector("a[id=idLogon].btn").click();
}
View pycharm
#!/usr/bin/env bash # -x -v
name=`basename $0`
APP_PATH=`realpath ~/Applications/JetBrains\ Toolbox`
declare -A APPNAME
APPNAME[phpstorm]="$APP_PATH/PhpStorm.app"
APPNAME[idea]="$APP_PATH/IntelliJ IDEA Ultimate.app"
APPNAME[pycharm]="$APP_PATH/PyCharm Professional.app"
View modal.js
/**
* Created by takuya on 20170809.
* 
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
View prod.html
<html><head>
<title>WindowsとOfficeのライセンス確認</title></head>
<body>
<form name="form1">
<p><input type="button" value="Windowsのライセンスを調査" onClick="show_license('')" /></p>
</form>
<div id="result"></div>
<script type="text/javascript">
//by takuya mori 2009-03-26
//Windowsのシリアルを取得する。
View aeon-wifi.rb
require 'mechanize'
m = Mechanize.new
m.get 'http://t.co'
return if m.page.uri.to_s =~ %r'^https?://t.co'
m.page.forms[0].submit
m.page.form( :action=> /email/ )
f = m.page.form( :action=> /email/ )
f.field( :type => /mail/ ).value = 'yormail@example.com'
f.submit()
View find
# alias の代替にfunction を定義
function find(){
local post=()
local pre=()
local opts=()
local path=''
local mindepth=1
while [[ $1 ]]; do
case "$1" in
-H | -L | -P ) pre+=($1);;
View bashrc
alias artisan='php artisan'
. vendor/balping/artisan-bash-completion/artisan