This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
文字コード表 | |
http://charset.uic.jp | |
から「iso-2022-jp」文字を取得して以下を実行 | |
iconv -f UTF-8 -t Shift-JIS moji-UTF8-ISO-2022-JP.txt バケバケ全然無理 | |
iconv -f UTF-8 -t cp932 moji-UTF8-ISO-2022-JP.txt バケバケ全然無理 | |
iconv -f UTF-8 -t ISO-2022-JP moji-UTF8-ISO-2022-JP.txt 半角カナは変換できない | |
iconv -f UTF-8 -t ISO-2022-JP-2 moji-UTF8-ISO-2022-JP.txt 半角カナも変換可能丸数字はダメ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import gdata.photos.service | |
import gdata.media | |
import gdata.geo | |
import getpass | |
import sys | |
import datetime | |
#実行:python picasa.py ユーザ名 パスワード 'アルバム名'>aaa.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TMP=~/open-talk.wav | |
touch $TMP | |
cd /usr/share/hts-voice/nitech-jp-atr503-m001 | |
#cd /usr/share/hts-voice/mei_happy | |
echo "$1" | open_jtalk \ | |
-td tree-dur.inf \ | |
-tf tree-lf0.inf \ | |
-tm tree-mgc.inf \ | |
-md dur.pdf \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# ---------------------------------------------------------------------------- | |
# ApacheのBASIC認証で指定回数のエラーを出した場合、一定の時間アクセス制御する | |
# ---------------------------------------------------------------------------- | |
# ---------- | |
# 処理概要 | |
# ---------- | |
# ・Apacheのエラーログからユーザなし、パスワードミスマッチを検知する | |
# ・その日付、時刻を取得する |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: custom_page | |
*/ | |
?> | |
<?php get_header(); ?> | |
<div id="content"> | |
<?php include_once(TEMPLATEPATH . '/topbanner.php'); ?> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dig $1 +noall +answer | | |
awk '{print($5)}'| | |
xargs -I{} grep {} /var/log/apache2/access_all.log | | |
awk 'BEGIN{FS="\""}{print $2}' | | |
sort | | |
uniq | | |
egrep -v "表示しなくて良い文字列1|表示しなくて良い文字列2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1日〜7日までの日曜日(%w=0)の16時に実行:第1日曜日にバックアップシェルを実行 | |
0 16 1-7 * * test $(date +\%w) -eq 0 && /hoge/hoge/tool/monthly_bkup.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#------------------------------------------------ | |
#実行月を取得 | |
prefix=`date +\%m` | |
#------------------------------------------------ | |
#バックアップ保存先 | |
ToBkPath="/Ubuntu-backup/backup/monthly" | |
#バックアップ名 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#-------------------------------------------------------------------- | |
#iptables-setup3 | |
# ファイアウォール初期設定スクリプト | |
# アクセス拒否IPアドレスの登録を行う | |
#---------------------------------------- | |
# 初期設定 | |
#---------------------------------------- | |
#アクセス拒否IP累積リスト | |
denyIpFile=/var/log/apache2/denyIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#-------------------------------------------------------------------- | |
#リアルタイムアクセス拒否β(syslog又はmail.log専用) | |
# | |
#処理概要: | |
# ①syslogを(ほぼ)リアルタイムで監視して、拒否したいアクセスをしてきたIPアドレスを | |
# 「iptables」に登録して、全ての通信を拒否する。 | |
# ②アクセス拒否IPを累積する | |
# ③アクセス拒否IP登録メールをroot宛に送信する | |
# |