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 5.12.1; | |
use warnings; | |
use Plack::Request; | |
use Router::Simple; | |
use FindBin; | |
use AnyEvent::Util qw(run_cmd); | |
my $router = Router::Simple->new(); | |
my @tap = (); | |
my $builder = "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/ |
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
Ti.include 'qunit/qunit.js' | |
Ti.include 'qunit/qunit-tap.js' | |
qunitTap QUnit, (message) -> | |
Ti.API.info message | |
xhr = Ti.Network.createHTTPClient() | |
xhr.open 'POST', 'http://192.168.3.2:5000/tap', false | |
xhr.send tap : message | |
, noPlan: true |
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
Index: sapi/cli/php_cli_server.c | |
=================================================================== | |
--- sapi/cli/php_cli_server.c (revision 318210) | |
+++ sapi/cli/php_cli_server.c (working copy) | |
@@ -571,6 +571,12 @@ | |
sapi_cli_server_register_variable(track_vars_array, "SERVER_SOFTWARE", tmp TSRMLS_CC); | |
efree(tmp); | |
} | |
+ { | |
+ char *tmp; |
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
$it = new CallbackFilterIterator( | |
new ArrayIterator(range(1, 10)), | |
function($v){ return $v % 2 == 1;} | |
); | |
foreach($it as $value) { | |
var_dump($value); | |
} |
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
<?php | |
interface Foo { | |
function test(); | |
} | |
interface Bar { | |
function test(); | |
} |
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/env perl | |
$buf = ''; | |
while(<STDIN>) { | |
$flag = $_ =~ m/^\s+0x[\da-f]{4}: /; | |
if (!$flag) { | |
$buf =~ s/\s//g; | |
$buf =~ s/[0-9A-Fa-f][0-9A-Fa-f]/pack("C", hex $&)/eg; | |
$buf = substr($buf, 52); |
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
<?php | |
function array_slide(&$array, $key, $amount) { | |
if ($amount === 0) { | |
return; | |
} | |
$keys = array_keys($array); | |
$values = array_values($array); | |
$target = array($keys[$key] => $values[$key]); | |
$left = array_slice($array, 0, $key); |
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
#!/bin/sh | |
URL=`perl -e '$in="'$1'"; $in =~ s/localhost/10.0.2.2/; print $in;'` | |
$ANDROID_SDK_HOME/platform-tools/adb shell am start -a android.intent.action.VIEW -d $URL |
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
{ | |
"instrumentation": "node-jscoverage", | |
"sloc": 3, | |
"hits": 2, | |
"misses": 1, | |
"coverage": 66.66666666666666, | |
"files": [ | |
{ | |
"filename": "build/main/js/sample-project.js", | |
"coverage": 66.66666666666666, |
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
./perl6 | |
> class t{} | |
t() | |
> role r{method hello{say 'hello'}} | |
r() | |
> class t_r does r {} | |
t_r() | |
> t_r.new().hello() | |
hello | |
> (t.new does r).hello() |
OlderNewer