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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdarg.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <netinet/in.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <sys/uio.h> | |
| #include <unistd.h> |
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/env perl | |
| use strict; | |
| use warnings; | |
| package Test::User; | |
| use Data::RuledFactory::Declare; | |
| factory { |
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/env perl | |
| use strict; | |
| use warnings; | |
| use Data::Dump qw(dump); | |
| use IO::Pipe; | |
| use Parallel::Prefork; | |
| use Time::HiRes; |
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/env perl | |
| use strict; | |
| use warnings; | |
| use Data::Dump qw(dump); | |
| use Parallel::ForkManager 0.7.6; | |
| my @servers = map { sprintf("svr%03d", $_) } (1 .. 1000); | |
| my %results; |
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
| MYSQL_BUILD_DIR = | |
| MYSQL_PLUGIN_DIR = | |
| CC := gcc | |
| CPPFLAGS := -Iinclude -I$(MYSQL_BUILD_DIR)/include -dynamiclib | |
| LIB_FILE := lib_mysqludf_calc_distance.dylib | |
| VPATH := src include | |
| all: lib_mysqludf_calc_distance.dylib | |
| lib_mysqludf_calc_distance.dylib: src/lib_mysqludf_calc_distance.c include/lib_mysqludf_calc_distance.h | |
| $(CC) $(CPPFLAGS) -o $@ src/lib_mysqludf_calc_distance.c |
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/env perl | |
| use strict; | |
| use warnings; | |
| use AnyEvent; | |
| my $cv = AnyEvent->condvar; | |
| for my $i (1..10) { | |
| $cv->begin; |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <hiredis/hiredis.h> | |
| /** | |
| * gcc -I/usr/local/include -L/usr/local/lib -lhiredis -Wall -o connect connect.c | |
| */ | |
| void redisDisconnect(redisContext *ctx) { |
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/env perl | |
| use strict; | |
| use warnings; | |
| use AnyEvent; | |
| use AnyEvent::Handle; | |
| use AnyEvent::Socket; | |
| use Data::Dump qw(dump); |
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/env perl | |
| use strict; | |
| use warnings; | |
| use FindBin; | |
| use lib "$FindBin::Bin/../lib"; | |
| use Getopt::Long; | |
| use IO::Socket::INET; | |
| use IO::Poll; | |
| use Log::Minimal; |
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
| sub select_query { | |
| my ($self, $table, $fields, $where, $opt) = @_; | |
| unless (ref $fields eq 'ARRAY') { | |
| Carp::croak("SQL::Maker::select_query: \$fields should be ArrayRef[Str]"); | |
| } | |
| my $stmt = $self->new_select( | |
| select => $fields, | |
| ); |