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 | |
#cd-romドライブの自動認識をoffに | |
sudo hal-disable-polling --device /dev/scd0 | |
#遅延書き込みを5秒から15秒へ | |
#sudo echo 1500 > /proc/sys/vm/dirty_writeback_centisecs | |
#無線の省電力モードを有効に | |
sudo iwpriv eth1 set_power 5 |
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 | |
/** | |
* visitorsでログを作るスクリプト | |
* | |
* need nkf,visitors,apache2 | |
*/ | |
error_reporting(E_ALL); | |
ini_set('display_errors', 'On'); | |
/** |
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 | |
if [ -z $1 ]; then | |
echo "Usage:$0 [project_name]" | |
exit | |
fi | |
base_dir="/var/lib/svn" | |
target_dir=$base_dir/$1 |
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 | |
/** | |
* PHPプロ!のnewsで何回他のニュースサイトから | |
* 引用しているかチェックするスクリプト | |
* | |
*/ | |
require_once 'HTTP/Client.php'; | |
$g_target_url = 'http://www.phppro.jp/news/'; | |
$g_start = 215; |
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 | |
/** | |
* nameの文字列がaを何回インクリメントすると表現できるかしらべるものっぽい | |
*/ | |
ini_set('max_execution_time', 5); | |
if ( !isset($_POST['name']) ) { | |
$str = <<<EOD | |
<form method="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
#!/usr/bin/env php | |
<?php | |
/** | |
* replace_files | |
* | |
* @example replace_files.php before after * | |
*/ | |
if ($argc < 4) { |
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
" Shift + 矢印で visual modeがはじまる | |
nnoremap <S-Up> v<Up> | |
nnoremap <S-Down> v<Down> | |
nnoremap <S-Left> v<Left> | |
nnoremap <S-Right> v<Right> | |
" visual mode 中のShift + 矢印は範囲選択 | |
vnoremap <S-Up> k | |
vnoremap <S-Down> j | |
vnoremap <S-Left> h |
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
#variation of http://urbangiraffe.com/2011/08/13/remote-editing-with-sublime-text-2/ that adds creating new folders remotely. | |
import sublime_plugin, os | |
class RemoteEdit(sublime_plugin.EventListener): | |
def on_post_save(self, view): | |
remote = { "/Users/leto/work/project": ["/usr/bin/scp", None, "user@server", "root_remote_path_like ~/project/", None] } | |
for dirname, target in remote.iteritems(): | |
if view.file_name().startswith( dirname ): |
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
{ | |
"cc_nyancat":{ | |
"id":"cc_nyancat", | |
"name":"Nyan down chart rocks!", | |
"description":"This is demonstration of plugin system.", | |
"url":"https:\/\/github.com\/downloads\/yandod\/cc_nyancat\/cc_nyancat-v0.3.1.zip", | |
"author":"yandod", | |
"author_url":"https:\/\/github.com\/yandod", | |
"version":"0.3.1" | |
}, |
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 | |
$url = 'https://docs.google.com/spreadsheet/viewform?formkey=dHlaWTV5U0xvVWdaZ0lNNkNIQ1dkeXc6MA'; | |
$names = array( | |
'halt', | |
'yando', | |
'takahashiyuya', | |
'tanakahisateru', | |
'shin1x1', | |
'remore', |