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
/* | |
* ===================================================================================== | |
* | |
* Filename: main.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 02/17/14 07:56:15 | |
* Revision: none |
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
class Bar; | |
class Foo | |
{ | |
public: | |
Foo() | |
{ | |
}; | |
Bar *bar; | |
InitBar() |
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
typedef enum { IPV4, IPV6 } jnx_address_family; | |
typedef struct jnx_socket | |
{ | |
int socket; | |
jnx_address_family addrfamily; | |
}jnx_socket; | |
typedef void (*listen_callback)(char*,size_t,char*); | |
typedef void (*broadcast_listen_callback)(char*,size_t); |
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
#ifndef __CONNECTION_CONTROL_H__ | |
#define __CONNECTION_CONTROL_H__ | |
typedef enum cstate { PRECONNECTION, HANDSHAKING, ENCRYPTING, DECRYPTING, SENDING }; | |
typedef struct connection_state { | |
raw_peer *local; //raw peer will contain an RSA keypair | |
raw_peer *foreign; //foreign peer will contain half an RSA keypair | |
char *shared_secret; | |
cstate state; |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: send_await.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 03/12/14 07:35:02 | |
* Revision: none |
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
// CONNECT TO EC2 | |
InputStream credentialsAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("AwsCredentials.properties"); | |
Preconditions.checkNotNull(credentialsAsStream, "File 'AwsCredentials.properties' NOT found in the classpath"); | |
AWSCredentials credentials = new PropertiesCredentials(credentialsAsStream); | |
AmazonEC2 ec2 = new AmazonEC2Client(credentials); | |
ec2.setEndpoint("ec2.eu-west-1.amazonaws.com"); | |
// CREATE EC2 INSTANCES |
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
import os,sys,getopt,argparse,shutil,configparser | |
#[GlobalOptions] | |
#COMPILER=gcc | |
#OUTPUT=pickle | |
#[CompilerOptions] | |
#OPTS=-o | |
#LIBS=-ljnxc | |
#SRC=*.c |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: main.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 04/08/14 13:19:50 | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: main.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 04/08/14 13:19:50 | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: jnxsocket.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 02/21/14 18:07:02 | |
* Revision: none |
OlderNewer