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
{% raw %} | |
LogFormat "\ | |
host:%h\t\ | |
time:%{%Y-%m-%d %H:%M:%S}t\t\ | |
method:%m\t\ | |
uri:%U%q\t\ | |
protocol:%H\t\ | |
status:%>s\t\ | |
referer:%{Referer}i\t\ | |
user-agent:%{User-Agent}i\t\ |
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
- lineinfile: > | |
regexp='^%wheel' | |
line='%wheel ALL=(ALL) NOPASSWD: ALL' | |
dest=/etc/sudoers |
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
$ sudo yum -y install compat-glibc-headers | |
$ git clone git://git.kitenet.net/ttyrec.git | |
$ cd ttyrec | |
$ make CFLAGS="-DSVR4 -D_XOPEN_SOURCE=500 -I/usr/lib/x86_64-redhat-linux5E/include" |
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: ascii-8bit | |
require 'spec_helper' | |
describe command('/usr/bin/curl -s http://localhost/wp-admin/install.php') do | |
it { should return_stdout /5分でできる WordPress の有名なインストールプロセスへようこそ/ } | |
end |
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
require 'spec_helper' | |
describe package('mysql-server') do | |
it { should be_installed } | |
end | |
describe service('mysqld') do | |
it { should be_enabled } | |
it { should be_running } | |
end |
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
$ echo 'echo $1; echo $2' | bash hoge fuga | |
bash: hoge: No such file or directory |
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 | |
# | |
# http://ftp.apnic.net/stats/apnic/delegated-apnic-latest | |
# | |
# | |
use strict; | |
use warnings; | |
print "#" x 78 ."\n"; | |
print "# \$Id\$\n"; |
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
register_read_type line => sub { | |
my ($self, $cb, $eol) = @_; | |
if (@_ < 3) { | |
# this is more than twice as fast as the generic code below | |
sub { | |
$_[0]{rbuf} =~ s/^([^\015\012]*)(\015?\012)// or return; | |
$cb->($_[0], "$1", "$2"); | |
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
--- /tmp/cronoutils.c 2013-05-21 20:08:08.369211753 +0900 | |
+++ src/cronoutils.c 2013-05-21 20:08:43.056192371 +0900 | |
@@ -195,11 +195,11 @@ | |
{ | |
struct stat stat_buf; | |
- if (stat(prevlinkname, &stat_buf) == 0) | |
+ if (lstat(prevlinkname, &stat_buf) == 0) | |
{ | |
unlink(prevlinkname); |
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
puki2doku.pl has moved to https://github.com/yteraoka/puki2doku |