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
% be irb -ractive_support/all | |
irb(main):001:0> options = { a: 1, b: 2, c: 3 } | |
=> {:a=>1, :b=>2, :c=>3} | |
irb(main):002:0> options.merge c: 4, d: 5 | |
=> {:a=>1, :b=>2, :c=>4, :d=>5} | |
irb(main):003:0> options.reverse_merge c: 4, d: 5 | |
=> {:c=>3, :d=>5, :a=>1, :b=>2} | |
irb(main):004:0> |
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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 2b8be4a..4df9452 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -5,7 +5,7 @@ ENDIF() | |
CHECK_FUNCTION_EXISTS(powl HAVE_POWL) | |
IF(NOT HAVE_POWL) | |
- ADD_DEFINITIONS("-Dpowl=pow") | |
+# ADD_DEFINITIONS("-Dpowl=pow") |
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
package MySQLCasualLog; | |
use strict; | |
use warnings; | |
use utf8; | |
use DBIx::QueryLog; | |
use Term::ANSIColor; | |
use Text::ANSITable; |
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
*** HTTP requests total: 202764 *** | |
*** HTTP requests stats order by time *** | |
count: 18433, total: 188.261999999996, mean: 0.0102133130798023 | |
path: /login | |
count: 3483, total: 8.70599999999991, mean: 0.00249956933677861 | |
path: /mypage |
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 -l | |
use strict; | |
use warnings; | |
$ENV{LANG} = "C"; | |
$ENV{PATH} ||= "/usr/local/bin:/usr/bin/:/bin"; | |
my $eth = shift || "eth0"; | |
`ip addr list dev $eth|grep 'inet '` =~ m{\.(\d+?)\.(\d+?)\/}; |
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 -l | |
use strict; | |
use warnings; | |
$ENV{LANG} = "C"; | |
$ENV{PATH} ||= "/usr/local/bin:/usr/bin/:/bin"; | |
my $eth = shift || "eth0"; | |
`ip addr list dev $eth|grep 'inet '` =~ m{inet (\d+?\.\d+?\.\d+?\.\d+?)\/}; |
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
escape | |
defkanji utf-8 | |
defencoding utf-8 | |
encoding utf-8 utf-8 | |
startup_message off | |
autodetach on | |
vbell off | |
defscrollback 5000 |
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
set nocompatible | |
syntax on | |
filetype plugin indent on | |
" encoding | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
set fileencoding=utf-8 | |
set fileencodings=utf-8,euc-jp,sjis,iso-2022-jp,cp932 |
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
{ | |
use Catalyst::Utils (); | |
no warnings 'redefine'; | |
sub Catalyst::Utils::class2prefix { | |
my $class = shift || ''; | |
my $case = shift || 0; | |
my $prefix; | |
if ( $class =~ /^.+?::([MVC]|Model|View|Controller)::(.+)$/ ) { | |
$prefix = $case ? $2 : do { | |
$prefix = $2; |
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
{ | |
use CSS::Tiny::Style (); | |
no warnings 'redefine'; | |
sub CSS::Tiny::Style::_sel_arr { | |
local $_ = shift; | |
my @d; | |
while ($_) { | |
my ($tag, $op); | |
OlderNewer