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
# the 0x67 message def | |
$srv_msg->[0x67] = def_msg(0x67, 'Set Slot', [ | |
pair(window_id => MC_byte), | |
pair(slot => MC_short), | |
slotupdate('slot_data'), | |
]); | |
# MC_byte and MC_short reader implementations | |
sub read_byte { return unpack('c', shift->read(1)) } |
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
# somewhere the app has a 'mango' attribute that was set up like this: | |
# $app->attr(mango => sub { Mango->new('localhost') }); | |
sub some_action { | |
my $self = shift; | |
$self->render_later; | |
$self->mango->db('mydb')->collection('baz')->find_one({ _id => $self->req->param('id') } => sub { | |
my ($coll, $err, $doc) = (@_); | |
if($err) { | |
$self->render(json => { error => $err }); |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Mojo::IOLoop; | |
my ($ip, $port, $status); | |
Mojo::IOLoop->client({ port => $port, address => $ip } => sub { | |
my ($loop, $error, $stream) = (@_); | |
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
[ | |
{ | |
"title" : "Technical Engineer: U.S.S.R.", | |
"id" : 127, | |
"ident" : "mechanicEngineer0" | |
}, | |
{ | |
"title" : "maxPiercingSeries", | |
"id" : 32, | |
"ident" : "maxPiercingSeries" |
OlderNewer