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
| Section "ServerLayout" | |
| Identifier "Layout0" | |
| Screen 0 "Screen0" 0 0 | |
| Screen 1 "Screen1" RightOf "Screen0" | |
| InputDevice "Keyboard0" "CoreKeyboard" | |
| InputDevice "Mouse0" "CorePointer" | |
| Option "Xinerama" "0" | |
| EndSection | |
| Section "Files" |
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 -n | |
| BEGIN { print "digraph modules {\n" } | |
| if(/^([^[:space:]]+).*\s([^[:space:]]+)$/) { | |
| print "# $1 -> $2\n"; | |
| for (split /,/,$2) { | |
| print " $1 -> $_;\n"; | |
| } | |
| } | |
| END { print "}" } |
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 "display.h" | |
| #include "third_party/i2cmaster.h" | |
| static const uint8_t number_table[] = { | |
| 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x77, 0x7C, | |
| 0x39, 0x5E, 0x79, 0x71 }; | |
| void init_display(int address) { | |
| i2c_start_wait(address + I2C_WRITE); | |
| i2c_write(0x21); |
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 feature ':5.10'; | |
| use autodie qw/open/; | |
| my $file = shift; | |
| open my $fh, '<', $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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use feature ':5.10'; | |
| use Config; | |
| my $event_size = | |
| ($Config{longsize} * 2) + # input_event.time (struct timeval) | |
| ($Config{i16size} * 2) + # input_event.type, input_event.code |
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
| has 'request_builder' => ( | |
| is => 'ro', | |
| isa => 'CodeRef', | |
| traits => ['Code'], | |
| handles => { request => 'execute' }, | |
| default => sub { | |
| my ($self) = @_; | |
| weaken $self; | |
| return sub { | |
| my ($method, $uri, $headers, $cb) = @_; |
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
| function EventListener() {} | |
| EventListener.prototype.listen_to = function (that) { | |
| for (var key in this) { | |
| var event; | |
| if(event = /^handle_(.+)$/.exec(key)){ | |
| var method = [this, this[event[0]]]; | |
| that.on( event[1], function() { | |
| method[1].apply(method[0], arguments); | |
| }); |
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 <errno.h> | |
| #include <netinet/in.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <sys/time.h> | |
| #include <sys/types.h> | |
| #include <time.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
| use strict; | |
| use 5.010; | |
| { package Class; | |
| sub new { my $self = bless $_[1], $_[0]; warn $self; $self } | |
| sub DESTROY { warn $_[0] } | |
| } | |
| # works | |
| { |
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 feature ':5.10'; | |
| use AnyEvent::HTTP; | |
| my $cv = AE::cv; | |
| http_get 'http://www.google.com/', $cv; |