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/perl | |
use strict; | |
use warnings; | |
use lib qw( lib extlib ); | |
use MT; | |
MT->new; | |
use Data::ObjectDriver; | |
$Data::ObjectDriver::DEBUG = 1; | |
MT->model('blog')->load( |
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
*markdown-cheat-sheet.jax* Markdown カンニングペーパー | |
作者: Kyo Nagashima <kyo@hail2u.net> | |
バージョン: 0.04 | |
説明: Markdown 記法のカンニングペーパーです。 | |
1. 記法の例 |markdown-cheat-sheet-examples| | |
1.1 段落 |markdown-cheat-sheet-paragraph| | |
1.2 改行 |markdown-cheat-sheet-linebreak| | |
1.3 テキストの強調 |markdown-cheat-sheet-emphasis| |
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
/*! | |
* hatena-bookmark-count.js | |
* | |
* Copyright (c) 2011 Kyo Nagashima <kyo@hail2u.net> | |
* This library licensed under MIT license: | |
* http://opensource.org/licenses/mit-license.php | |
*/ | |
/*global jQuery, $ */ |
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
学生「どうかしました?野比先生」 | |
のび太「ううん、何でもないよ。それより研磨は終わったかい?」 | |
学生「はい。これでもうバリはないはずです」 | |
のび太「本体側のインターロック回路も大丈夫?」 | |
学生「はい、動作確認済みです」 |
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 perl | |
# uglifyjs.pl - Compile your JavaScript code with UglifyJS HTTP API | |
# Usage: uglifyjs.pl < <original file> > <compiled file> | |
# License: http://hail2u.mit-license.org/2012 | |
# Modified: 2012-04-13T05:20:28+09:00 | |
use strict; | |
use warnings; |
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 perl | |
use strict; | |
use warnings; | |
use JSON; | |
use LWP::UserAgent; | |
my $file = shift; |
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/perl | |
package MT::Tool::Foo; | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use lib map File::Spec->catdir( $FindBin::Bin, File::Spec->updir, $_ ), qw/lib extlib/; | |
use base qw( MT::Tool ); | |
sub usage { '--debug 1' } |
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
# | |
# This is an example VCL file for Varnish. | |
# | |
# It does not do anything by default, delegating control to the | |
# builtin VCL. The builtin VCL is called when there is no explicit | |
# return statement. | |
# | |
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ | |
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples. |
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
### このシェルスクリプトは、Latin1のテーブルにUTF8でコンテンツが書き込まれてしまったデータベースを修復します。 | |
my_db='dbname'; | |
my_user='dbuser'; | |
my_pw='dbpassword'; | |
for my_table in $(mysql -u$my_user -p$my_pw -N -s -r $my_db -e 'show tables;'); do | |
for my_column in $(mysql -u$my_user -p$my_pw -N -r -s -e "use $my_db; show columns from $my_table" | cut -f1); do | |
echo $my_column; | |
mysql -u$my_user -p$my_pw -N -r -s -e "use $my_db; UPDATE $my_table SET $my_column = CONVERT(CAST(CONVERT($my_column USING latin1) AS BINARY) USING utf8);" |