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
#include <stdio.h> | |
void func() __attribute__((deprecated)); | |
int main(int argc, char** argv) | |
{ | |
func(); | |
return 0; | |
} |
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 'gruff' | |
f = open(ARGV[0]) | |
seq = f.read.delete(" \n").upcase | |
f.close | |
hydropathy_index = { | |
'A' => 1.8, | |
'B' => -3.5, | |
'C' => 2.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
use strict; | |
use warnings; | |
use AnyEvent::Redis; | |
my $redis = AnyEvent::Redis->new( | |
host => '127.0.0.1', | |
port => 6379, | |
encoding => 'utf8', | |
on_error => sub { warn @_ }, |
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 AnyEvent::Handle; | |
use AnyEvent::Redis; | |
my $redis_sub = AnyEvent::Redis->new( | |
host => '127.0.0.1', | |
port => 6379, | |
encoding => 'utf8', |
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 IO::Socket::INET; | |
use Parallel::Prefork; | |
sub MaxRequestsPerChild { 100 }; | |
my $listen = IO::Socket::INET->new( | |
Listen => 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
use strict; | |
use warnings; | |
use IO::Socket::INET; | |
use Parallel::Prefork; | |
use AnyEvent::Handle; | |
use AnyEvent::Redis; | |
$| = 1; |
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
/* | |
* statusbar.m | |
* sample for showing something to status-bar | |
* | |
* How to compile and run. | |
* $ gcc statusbar.m -framework Cocoa | |
* $ ./a.out | |
*/ | |
#import <Cocoa/Cocoa.h> |
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
#include <iostream> | |
#include <vector> | |
#include <ctime> /* time */ | |
#include <csignal> /* signal, kill */ | |
#include <unistd.h> /* fork, usleep */ | |
#include <sys/wait.h> /* wait */ | |
#include <sys/types.h> /* pid_t */ | |
using namespace std; | |
class prefork { |
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 ZeroMQ qw/:all/; | |
my $server_addr = 'tcp://127.0.0.1:1986'; | |
my $context = ZeroMQ::Context->new; | |
my $sock = $context->socket(ZMQ_REP); | |
$sock->bind($server_addr); |
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 ZeroMQ qw/:all/; | |
use Data::Dumper; | |
my $peer_addr = 'tcp://127.0.0.1:1986'; | |
my $context = ZeroMQ::Context->new; | |
my $sock = $context->socket(ZMQ_REQ); | |
$sock->connect($peer_addr); |
OlderNewer