2012-02-01ãã1ã¶æéã®è¨äºä¸è¦§
åãæ¢ããmongoDBãããã£ã¦ããããã£ãã®ã§ æä½éã®ãã¨ããã¾ããã¡ã¢ã -- CentOS 5.7 (64bit) -- mongoDB 1.6.4 (64bit) -- MongoDB(Perl) 0.45[åè] MongoDBã¯ããã¦ã¿ã¾ãããããã¨ããããã¾ããã»ã¼ãã®ã¾ã¾å®è¡ãã¦ãã¾ããã¤ã³ã¹ãã¼ã«ã¨ã $â¦
å¼ãç¶ããªã£ãæ¬ã¨ã¢ã«ãã«æ¬ããã©ããå²ãã®éã«ã¹ãã¼ã¹éããããªã£ã¡ããã use strict; use warnings;use 5.010;my $subrutine = sub { my $name = shift; say "My name is : $name ";};$subrutine->("watashi"); my @names = qw( ore washi wai );foâ¦
å¼ãç¶ããªã£ãæ¬ã¨ã¢ã«ãã«æ¬ããä»ã®æ代ã ã¨å¤§è¦æ¨¡ãªå®ã·ã¹ãã ã¨ããããªã㨠ãã¾ãã¡ãªã½ã¼ã¹ã«å¯¾ãã¦è¿ãã§æããããªãã®ãæã ãªã£ã¦æããã¡ã¢ãªã128Kã¨ãã§æã¡æ©ãããããªãã·ã³ããã£ãã楽ããããç¡åé å #!/usr/bin/env perluse strict; â¦
å¼ãç¶ããªã£ãæ¬ã¨ã¢ã«ãã«æ¬ãã #!/usr/bin/perluse strict; use warnings;use 5.010;my @one = qw(one two three);my @two = ("hoge", \@one);[$one[0] => one $one[1] => two $one[2] => three] ãã®3ã¤ã®æ å ±ãå ¥ã£ãã¢ãã¬ã¹ã@twoã«æ¸¡ã@twoã®ä¸ã¤ç®â¦
å¼ãç¶ããªã£ãæ¬ã¨ã¢ã«ãã«æ¬ãã"$_" my @list = qw(one two three); for (@list) { print "$_ "; }å¼æ°ã²ã¨ã¤ãæã«ä½¿ãã"@_" #!/usr/bin/env perluse strict; use warnings; use Data::Dumper;my @num = (1..10);sub total { my $sum = shift @_; printâ¦
å¼ãç¶ããªã£ãæ¬ã¨ã¢ã«ãã«æ¬ãããjoin my @foo = (1, 3, 5, 7, 9); print "\@foo is @foo\n";my $bar = join ":", @foo; print "\$bar is $bar\n";[çµæ] @foo is 1 3 5 7 9 $bar is 1:3:5:7:9é åãªãããã²ã¨ã¤ã«ã¾ã¨ãã¡ãããã ããããsplit my @hogâ¦
my $foo = "1"; say q($foo);say '$foo'; ã¨åãæå³ çµæã¯å¤æ°ãå±éãããã«"$foo"ãããã£ã¦ããã say qq($foo);say "$foo"; ãã£ã¡ã¯ããã«ã¯ã©ã¼ãã¼ã·ã§ã³ã¨åãæå³ãªã®ã§ä¸èº«ã®"1"ãè¿ã£ã¦ãããã¡ãªã¿ã«qwã¯åèªæ¯ã«åããã£ã¦æå³ãªã®ã§ãqã¨ãqâ¦
丸ä¸æ¥ããã£ã¦Chefã¤ã³ã¹ãã¼ã«ããã è±èªèªããªããããªãã£ã·ã£ã«ã ãã ã¨æéããã£ããç°å¢ CentOS 5.7(64bit) ruby 1.8.7 gem 1.8.10 ã¤ã³ã¹ãã¼ã«æé æåã¯æ¯è¦ã®Ubuntu 11.10ã§ããã±ã¼ã¸ã§ãµã¯ã£ã¨å ¥ã㦠OSã¤ã³ã¹ãã¼ã«ã¾ã§ãã£ã¦ã¿ããã¨æã£ãâ¦
Zabbixã®éçºã«ããã主ãªååã¦ã¼ã¶ã®ä½¿ãåæãéè¦ããã㨠ä½äºãåç´åããã㨠å¦çã«ä½¿ç¨ãããªã½ã¼ã¹ãã§ããã ãå°ãªããããã¨ è¿ éã«å¯¾å¿ããã㨠ã½ããã¦ã§ã¢ã®ããããå´é¢ãããã¥ã¡ã³ãåãããã¨ç´ æ´ãããããã©ããã¢ã¨ããååã¯ãµãã«â¦
WRYYYYYYYYYYYYï¼ï¼ï¼ä½ç³»çã«å¦ã¶ å®å ¨ãªWebã¢ããªã±ã¼ã·ã§ã³ã®ä½ãæ¹ èå¼±æ§ãçã¾ããåçã¨å¯¾çã®å®è·µä¸éãèªã¿çµãã£ãã®ã§gistã«å人çã«ã¾ã¨ãã¾ããã æ å ±ã®ã ããããªã©èä½æ¨©çã«ã¾ãããã§ãããæãã¦ãã ããã gist https://gist.github.comâ¦
ãããã¿ãããªç´ 人ã«æ¯ãçãããããªæè¡è æªæºã®è ã«ã¨ã£ã¦ 徳丸æ¬ã¯ã¾ãã«æå ¸ã¨ãªãå¾ãã§ãããããããããã¨ãããã¨ã§ãã¦ã¼ã¶æ å ±ããµã¼ãã¸ãããæã¯GETã§ã¯ãªãPOSTã§ãã¨ããåºç¤çãªã話ãget.html[sourcecode] <form method="GET"> USER NAME<input type="text" name="user"><br> PASSWORD<input type="password" name="pw"><br> <input type="submit"> [/sourc</form>â¦