※ちょっと古い
参考
$ cat /dev/urandom | tr -dc '0-9a-zA-Z!$%&' | fold -w 16 | head -1 | |
a$L73NTcB&MMTzdl | |
$ |
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
begin | |
require 'aws-sdk-core' | |
rescue LoadError | |
abort "please run 'gem install aws-sdk-core'.\n" | |
end | |
trap(:INT) { # Ctrl-Cされたら終了 |
sudo tail -100f /var/log/squid3/access.log | ruby -rdate -pe 'BEGIN{$stdout.sync=true; trap(:INT){exit}}; $_.sub!(/^\d+/,Time.at($&.to_i).strftime("[%Y-%m-%d %T]"))' |
: | |
# SEE ALSO : http://iandeth.dyndns.org/mt/ian/archives/000651.html | |
# share history for all terminals | |
function share_history { | |
history -a | |
history -c | |
history -r | |
} |
: | |
pathmunge () { | |
case ":${PATH}:" in | |
*:"$1":*) | |
;; | |
*) | |
if [ "$2" = "after" ] ; then | |
PATH=$PATH:$1 | |
else |
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# oui.txtの入手方法: | |
# curl -O http://standards.ieee.org/develop/regauth/oui/oui.txt | |
# OUIデータベースの読み込み | |
def oui_store filename,o | |
# ファイルから読み込む |
#!/usr/bin/env ruby | |
require "net/http" | |
query_url = 'http://standards.ieee.org/cgi-bin/ouisearch' | |
irregular = { | |
"080027" => "VirtualBox Guest", | |
"525400" => "QEMU/KVM Guest", | |
} |