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
| <html> | |
| <body> | |
| <script src="test.js"></script> | |
| </body> | |
| </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
| tweet "\u2028 \u2029 これかなあ" | |
| ↓ | |
| json "\ \ \u3053\u308c\u304b\u306a\u3042" | |
| これでJSONのパースエラーになる |
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 perl | |
| use strict; | |
| use warnings; | |
| use File::Basename; | |
| use Plack::Builder; | |
| use Plack::App::CGIBin; | |
| my $basedir = dirname(__FILE__); |
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
| package Acme::AutoInstall; | |
| use strict; | |
| use warnings; | |
| my $first; | |
| my @orig_argv; | |
| BEGIN { | |
| $first = 1; | |
| @orig_argv = @ARGV; | |
| }; |
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/perl | |
| # -*- coding:utf-8 -*- | |
| use strict; | |
| my $SVNLOOK='/usr/bin/svnlook'; | |
| sub main { | |
| my ( $repos, $txn ) = @_; | |
| my @log_cmd = ( $SVNLOOK, 'log', "-t$txn", $repos ); | |
| open my $pipe, '-|', @log_cmd or die $!; |
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
| use strict; | |
| use warnings; | |
| use Fcntl qw/ :DEFAULT :flock :seek /; | |
| open my $fh, "+<", "a.txt"; | |
| flock $fh, LOCK_EX; | |
| my $data = <$fh>; | |
| truncate $fh, 0; | |
| seek $fh, 0, SEEK_SET; | |
| print $fh "abc"; |
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 perl | |
| use strict; | |
| use warnings; | |
| use Plack::Builder; | |
| use AnyEvent; | |
| use Cache::LRU; | |
| use Sys::Virt; | |
| use JSON; | |
| use Data::Section::Simple qw/ get_data_section /; |
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
| use strict; | |
| use Regexp::Log::Common; | |
| use Data::Dumper; | |
| { | |
| # combined の末尾にフィールド追加 | |
| $Regexp::Log::Common::FORMAT{":more_extended"} | |
| = $Regexp::Log::Common::FORMAT{":extended"} . ' %more'; | |
| # 追加したフィールドにマッチする正規表現 | |
| $Regexp::Log::Common::REGEXP{'%more'} = '(?#=more)\w+(?#!more)'; |
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
| # virt-install --connect qemu:///system --name=test --ram=512\ | |
| --file=/dev/VolGroup00/test --vcpus=1\ | |
| --os-variant=virtio26 --nographics --accelerate\ | |
| --hvm --extra-args='ks=http://192.168.122.1:5000/ console=tty0 console=ttyS0,115200n8'\ | |
| --location="http://ftp.jaist.ac.jp/pub/Linux/CentOS/5.5/os/x86_64/" |
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
| # virt-install --name sl6 --ram 1024 --disk /var/tmp/sl62.img \ | |
| --location http://ftp.jaist.ac.jp/pub/Linux/scientific/6/x86_64/os/ \ | |
| --nographics --hvm --os-variant=virtio26 --network bridge=br0 \ | |
| --os-type=linux --keymap ja \ | |
| --extra-args='ks=http://example.com/sl6.ks console=tty0 console=ttyS0,115200n8' |