Skip to content

Instantly share code, notes, and snippets.

@satokjp
satokjp / si-r_g100
Created March 17, 2015 06:48
F社ルーター Si-R G100
#パスワードの設定
password admin set ***** ←adminへのパスワード設定
#グローバル側インターフェース設定
ether 1 1 vlan untag 1 ←GROUP1のポートをグローバル側とする
delete lan 0 ←初期設定情報をクリア
lan 0 ip address 133.5.xxx.xxx/24 3 ←グローバル側アドレス設定
lan 0 ip route 0 default 133.5.xxx.254 1 0 ←デフォルトゲートウェイ
#!/bin/bash
WHOIS="/usr/bin/whois"
CHOST="/usr/bin/host"
TRACEROUTE="/usr/sbin/traceroute"
JPNIC="whois.nic.ad.jp"
APNIC="whois.apnic.net"
ARIN="whois.arin.net"
RIPE="whois.ripe.net"
LACNIC="whois.lacinc.net"
@satokjp
satokjp / add_kmz.sh
Last active August 29, 2015 14:00
Android My Tracks App. kmz files combine script for MacOS X
#!/bin/bash
#
#######
# out.put files
f_kml="doc.kml"
f_kmz="out.kmz"
# tmp file
f_tmp="tmp.kml"
@satokjp
satokjp / .bash_profile
Last active August 29, 2015 14:00
Mac OS X bash /Users/user_name/.bash_profile $ source .bash_profile
alias ll='ls -l'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias h=history
export PATH=$HOME/bin:$HOME/sh:$PATH
#include <stdio.h>
int main(){
printf("sizeof(short): %d\n", (int) sizeof(short));
printf("sizeof(int): %d\n", (int) sizeof(int));
printf("sizeof(long): %d\n", (int) sizeof(long));
#!/usr/bin/expect
# for cygwin64
#
# time format:
# date +"%m/%d %k:%M:%S %Y"
#
# timeout sec
set timeout 10
#
@satokjp
satokjp / set_time.sh
Created April 3, 2014 07:40
set time
#!/usr/bin/bash
#
if [ $# -ne 1 ]; then
echo
echo "command line error!"
echo "Usage: $0 [IP_Address]"
exit 1
fi
DATE=`date +"%m/%d %k:%M:%S %Y"`
@satokjp
satokjp / .bashrc
Last active August 29, 2015 13:57
# alias
alias ll='ls -l'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias h=history
PATH="$PATH":~/sh:~/bin
@satokjp
satokjp / test_ssh.tcl
Created March 28, 2014 06:46
expect ssh sample script
#!/usr/bin/expect --
# for cygwin64 Windows
#
# timeout sec
#set timeout 10
set timeout -1
# HOST & ID
set HOST "[email protected]"
@satokjp
satokjp / test_sftp.tcl
Created March 28, 2014 06:42
expect sftp sample script
#!/usr/bin/expect
# for cygwin64
#
puts "start"
#spawn ping 192.168.1.101
spawn sftp [email protected]
expect "password: "
send "usr-passwd\n"