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
$ MOJO_MODE=production morbo script/myapp |
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
diff --git a/lib/Mojo/Cookie/Response.pm b/lib/Mojo/Cookie/Response.pm | |
index 30d9aa1..98b4fa5 100644 | |
--- a/lib/Mojo/Cookie/Response.pm | |
+++ b/lib/Mojo/Cookie/Response.pm | |
@@ -31,7 +31,7 @@ sub parse { | |
# "expires" is a special case, thank you Netscape... | |
if ($name =~ /^expires$/i) { | |
push @$pairs, @{shift @$tree // []}; | |
- my $len = $pairs->[0] && $pairs->[0] =~ /-/ ? 6 : 10; | |
+ my $len = ($pairs->[0] // '') =~ /-/ ? 6 : 10; |
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 Plack::Builder; | |
builder { | |
enable sub { | |
my $app = shift; | |
sub { | |
my $env = shift; | |
$env->{"HTTP_X_Forwarded_HTTPS"} = 1; | |
my $res = $app->($env); | |
return $res; | |
}; |
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 Mojo::Base -strict; | |
use Test::More; | |
use Test::Mojo; | |
my $t = Test::Mojo->new('MyApp'); | |
$t->app->plugin(plack_middleware => [ | |
'Session' => {store => '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
$ curl -L https://raw.github.com/CHH/phpenv/master/bin/phpenv-install.sh | bash | |
$ git clone git://github.com/CHH/php-build.git ~/.phpenv/plugins/php-build | |
$ echo 'export PATH="$HOME/.phpenv/bin:$PATH"' >> ~/.bashrc | |
$ echo 'eval "$(phpenv init -)"' >> ~/.bashrc | |
$ exec $SHELL -l |
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
@@ -358,6 +358,11 @@ | |
cd "$source_path" | |
{ | |
+ if which apxs > /dev/null 2>&1; then | |
+ _LIBEXECDIR=`apxs -q LIBEXECDIR` | |
+ sed -i -e "s|LIBEXECDIR='\$(INSTALL_ROOT)$_LIBEXECDIR'|LIBEXECDIR=$PREFIX/libexec|" $TMP/source/$DEFINITION/Makefile | |
+ fi | |
+ | |
make |
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
MsgBox "Hello world" | |
Debug.Print "Hello world" |
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
check_certificate = off |
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
$ plenv install-cpanm | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 303 0 303 0 0 2648 0 --:--:-- --:--:-- --:--:-- 2657 | |
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 | |
100 226 100 226 0 0 198 0 0:00:01 0:00:01 --:--:-- 198 | |
Bareword found where operator expected at - line 3, near "400 Bad" | |
(Missing operator before Bad?) | |
Bareword found where operator expected at - line 6, near "<p>Your" | |
(Missing operator before Your?) |
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
perl -i -ple 's/\[\\x([a-f0-9]{2})\]/pack("H*", $1)/egx' result.xml |