This file contains 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 | |
/** | |
* コマンドラインから、 | |
* % php hoge.php | |
* って感じで実行してください〜 | |
*/ | |
// コレ必要です → https://github.com/abraham/twitteroauth | |
require_once "./twitteroauth/twitteroauth/twitteroauth.php"; |
This file contains 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
body { | |
background: #FFFFFF; | |
font-family: Georgia; | |
} | |
h1 { | |
border: none; | |
background: none; | |
text-align: center; | |
text-color: #111111 |
This file contains 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
function startup(&$controller) { | |
$this->Controller =& $controller; | |
if( defined( 'COMPONENTS' ) ){ | |
$this->logPath(COMPONENTS); | |
$this->errorlogPath(COMPONENTS); | |
} | |
$params = array( | |
'host' => 'メールサーバー名', | |
'port' => 587 , // または25 |
This file contains 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
$ /usr/sbin/httpd -v |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
files = os.listdir('./') | |
for file in files: | |
if re.match('[0-9a-zA-z]+\s2\.[JPG|CR2]', file): |
This file contains 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
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | |
wget ftp://ftp.jp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz | |
wget ftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz | |
tar jxvf vim-7.3.tar.bz2 | |
tar zxvf vim-7.2-extra.tar.gz | |
tar zxvf vim-7.2-lang.tar.gz | |
mv vim72 vim73 | |
mkdir vim73/patches | |
cd vim73/patches | |
curl -O "ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.[001-538]" |
This file contains 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 | |
d=`date +'%Y-%m-%d %H:%M'` | |
result=`mysqladmin -uroot -pjup1ter extended-status | grep 'Threads_connected' | awk -F"|" '{print $3}'` | |
echo $d : $result |
This file contains 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
function log() { | |
try { | |
console.log.apply(console, arguments); | |
} | |
catch(e) { | |
try { | |
opera.postError.apply(opera, arguments); | |
} | |
catch(e) { | |
alert(Array.prototype.join.call( arguments, " ")); |
This file contains 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
# 5.0系と5.1系で違っていつも調べなおすのでメモ | |
# エラー | |
log-warnings = 2 # 警告も出す | |
log-error=/var/lib/mysql/{LOG_FILE_NAME} | |
# スロークエリ | |
log_slow_queries=mysql-slow.log | |
long_query_time={n} # n秒以上かかったクエリをログに出力 |
This file contains 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
<ダウンロード> | |
$ wget http://innotop.googlecode.com/files/innotop-1.8.1.tar.gz | |
$ tar zxvf innotop-1.8.1.tar.gz | |
<事前に、必要なcpanモジュールインストール> | |
$ sudo cpan install Time::HiRes | |
$ sudo cpan install Term::ReadKey | |
<インストール> | |
$ cd innotop-1.8.1 |
OlderNewer