Skip to content

Instantly share code, notes, and snippets.

Avatar

takuya@mori takuya

  • Osaka City Univ
  • Osaka,Japan
View GitHub Profile
@takuya
takuya / update-unbound-blocklist.sh
Last active May 16, 2020
unboundのdnsブロッキングリストを更新する。
View update-unbound-blocklist.sh
#!/usr/bin/env sh
## 2020-05-15 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
View Dockerfile
FROM php:7.2.1-fpm-alpine3.7
MAINTAINER takuya-1st
ENV creator=takuya
COPY ./php-fpm.conf /usr/local/etc/php-fpm.d/zzz-99-.$creator.conf
RUN mkdir -p /usr/local/var/run/php-fpm
VOLUME /usr/local/var/run/php-fpm
VOLUME /var/www/html
View omxplayer-with-tvremote.py
#!/usr/bin/env python
import sys
import re
import atexit
import inspect
import time
import subprocess
You can’t perform that action at this time.