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
<script> | |
// returns the node, given its name, null if not found | |
function get_node_by_name(name, bigfish) { | |
for (var lookup in bigfish["nodes"]) { | |
if (lookup["name"] == name) { | |
return lookup; | |
} | |
} | |
return null; |
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 -W | |
use strict; | |
use warnings; | |
use File::Spec; | |
foreach (<*.epub>) { | |
my $epub_file = $_; | |
my $mobi_file = $epub_file; | |
$mobi_file =~ s/\.epub/\.mobi/; |
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 strict; | |
use warnings; | |
use Data::Dumper; | |
my $MAX_INT = 2 ** 16; | |
sub rand_boundary { | |
my ($min, $max) = @_; | |
my @possible_values = ($min .. $max); | |
return $possible_values[ int(rand(@possible_values)) ]; |
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 strict; | |
use warnings; | |
use Test::More import => ['!pass']; | |
{ | |
use Dancer; | |
use Dancer::Plugin::SiteMap; | |
get '/foo' => sub { 11 }; |
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
1.3080 | |
[ ENHANCEMENTS ] | |
* PSGI handler code cleaned up (chromatic). | |
* Improved warning localizations (chromatic). | |
[ DOCUMENTATION ] | |
* Dancer::Plugins typos (Olof Johansson). | |
* PSGI handler documented (chromatic). |
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
get '/' => sub { | |
stream => sub { | |
send 'foo' | |
sleep 0.5; | |
send 'bar'; | |
sleep 0.5; | |
}; |
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
* 8abaca8 fix conflict (24 hours ago, franck cuny) | |
|\ | |
| * 64ecdbd reflect changes + remove TABS (24 hours ago, franck cuny) | |
| * 2e57b5f remove ':syntax'; no more warnings (24 hours ago, franck cuny) | |
* | 84c9622 Merge branch 'feature/fix_pod_typo' into devel (24 hours ago, Sawyer X) | |
|\ \ | |
| * | 5ca5d6f reflecting change (24 hours ago, Sawyer X) | |
| * | dac940d Fix typo in Dancer::Config's POD documentation. (24 hours ago, Stefan Horn | |
|/ / | |
* | f1e4ae1 Merge branch 'review/ambs-PR/dancer_response_rendering_files' into devel ( |
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 Dancer; | |
use DBI; | |
use File::Spec; | |
use File::Slurp; | |
use Template; | |
set 'database' => File::Spec->tmpdir() . '/dancr.db'; | |
set 'session' => 'Simple'; | |
set 'template' => 'template_toolkit'; | |
set 'logger' => 'console'; |
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
require 'Spore' | |
local github = Spore.new_from_spec 'github.json' | |
github:enable 'Format.JSON' | |
github:enable 'Runtime' | |
local r = github:user_information{format = 'json', username = 'schacon'} | |
print(r.status) --> 200 |
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
# install Plack::Middleware::Debug and Dancer::Debug | |
# environments/development.yml | |
plack_middlewares: | |
Debug: | |
- panels | |
- | |
- Memory | |
- Dancer::Session |
NewerOlder