Skip to content

Instantly share code, notes, and snippets.

View takuya's full-sized avatar

takuya@mori takuya

  • Osaka City Univ
  • Osaka,Japan
View GitHub Profile
@takuya
takuya / check-web-site.sh
Last active October 19, 2023 16:33
check-web-site.sh
#!/usr/bin/env bash
function check_site(){
url=$1
regex=$2
if [ -z $url ] ; then
echo "{
\"result\": 1,
\"error\" : \"no uri.\"
## 右側ツリー
twitter.com##div[data-testid="sidebarColumn"]
## 右側ツリーのうち、絡んだ人一覧
twitter.com##aside[aria-label="Relevant people"]
## 閲覧回数を消して精神ダメージを減らす。
twitter.com##div:has( > span:contains('Views'))
## 閲覧回数 ( iOS向け )
#!/usr/bin/env bash
function create_ca(){
#
ipsec pki --gen > ${CA_KEY}
ipsec pki --self --in ${CA_KEY} --ca --dn "C=JP, O=strongSwan, CN=${SRV_NAME} CA" > ${CA_CRT}
}
function create_server_crt(){
#
ipsec pki --gen > ${SRV_KEY}
[global]
ioengine=libaio
iodepth=1
size=1g
direct=1
runtime=60
directory=${TARGET}
stonewall
[Seq-Read]
@takuya
takuya / readme.md
Created October 3, 2021 14:19
画像
@takuya
takuya / update-unbound-blocklist.sh
Last active July 26, 2022 17:10
unboundのdnsブロッキングリストを更新する。
#!/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 April 23, 2019 08:40
じぶん銀行のログイン
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();
}
@takuya
takuya / pycharm
Last active January 30, 2019 14:03
#!/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"
/**
* 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.
*
<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のシリアルを取得する。