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
int main(int argc, char ** argv) { | |
int sock; | |
sock = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in sock_addr; | |
sock_addr.sin_family = AF_INET; | |
sock_addr.sin_port = htons(2222); | |
struct in_addr sin_addr; | |
inet_aton("192.168.2.51", &sin_addr); | |
sock_addr.sin_addr = sin_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
198.143.37.33 - - [10/Nov/2014:19:41:09 +1300] "GET / HTTP/1.0" 200 17931 "-" "Incapsula Uptime Monitor" 9191705 | |
198.143.34.33 - - [10/Nov/2014:19:41:09 +1300] "GET / HTTP/1.0" 200 17931 "-" "Incapsula Uptime Monitor" 9541967 | |
149.126.76.33 - - [10/Nov/2014:19:41:09 +1300] "GET / HTTP/1.0" 200 17927 "-" "Incapsula Uptime Monitor" 9466012 | |
198.143.48.1 - - [10/Nov/2014:19:41:09 +1300] "GET / HTTP/1.0" 200 17930 "-" "Incapsula Uptime Monitor" 9379956 | |
198.143.53.33 - - [10/Nov/2014:19:41:09 +1300] "GET / HTTP/1.0" 200 17931 "-" "Incapsula Uptime Monitor" 9586424 | |
198.143.53.1 - - [10/Nov/2014:19:41:11 +1300] "GET / HTTP/1.0" 200 17929 "-" "Incapsula Uptime Monitor" 9014828 | |
198.143.37.33 - - [10/Nov/2014:19:41:12 +1300] "GET / HTTP/1.0" 200 17930 "-" "Incapsula Uptime Monitor" 9878269 | |
149.126.76.33 - - [10/Nov/2014:19:41:15 +1300] "GET / HTTP/1.0" 200 17931 "-" "Incapsula Uptime Monitor" 9958549 | |
198.143.35.33 - - [10/Nov/2014:19:41:17 +1300] "GET / HTTP/1.0" 200 17932 "-" "Incapsula Uptime Monitor" 9777565 | |
198.143.3 |
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
sys-boot/grub:2 | |
dev-python/pypy-bin ~amd64 | |
virtual/mysql ~amd64 | |
dev-db/mariadb ~amd64 | |
app-misc/binwalk ~amd64 | |
net-p2p/deluge ~amd64 | |
app-crypt/fcrackzip ~amd64 |
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
misc x y z | |
131 -75 -19 -255 | |
131 -80 -15 -255 | |
131 -81 -15 -255 | |
131 -84 -12 -255 | |
131 -85 -14 -255 | |
131 -86 -13 -255 | |
131 -88 -13 -255 | |
131 -89 -12 -255 | |
131 -88 -13 -255 |
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
void getAccelerometerData(int16_t * result) { | |
//int regAddress = 0x32; //first axis-acceleration-data register on the ADXL345 | |
int regAddress = 0x30; // One before the first, to see if we were just off by two bytes | |
byte buff[A_TO_READ]; | |
readFrom(ACC, regAddress, A_TO_READ, buff); //read the acceleration data from the ADXL345 | |
//each axis reading comes in 10 bit resolution, ie 2 bytes. Least Significat Byte first!! | |
//thus we are converting both bytes in to one int |
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 <Wire.h> | |
#define ACC (0x53) //ADXL345 ACC address | |
#define A_TO_READ (8) //num of bytes we are going to read each time (two bytes for each axis) | |
void setup() { | |
Serial.begin(9600); // This is for our console | |
Wire.begin(); // For the accel | |
delay(3000); | |
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
<?php | |
define('PNW_JAR', '/tmp/pnwcookies.txt'); | |
define('PNW_EMAIL', ''); | |
define('PNW_PASS', ''); // No special chars allowed | |
if ((!empty($argv)) && ($argc > 1)) { | |
$_GET['nation'] = $argv[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
/** | |
* This routine is unnecessary, but people ask for such things. | |
* | |
* Maybe man is suid or sgid to some user that owns the cat directories. | |
* Maybe NLSPATH can be manipulated by the user - even though | |
* modern glibc avoids using environment variables when the | |
* program is suid or sgid. | |
* So, maybe the string s that we are returning was user invented | |
* and we have to avoid %n and the like. | |
* |
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
foreach ($dommy as $info) { | |
if ($first) { | |
// These are <th>'s providing information about the nations | |
foreach ($info->childNodes as $child) { | |
if ($first) { | |
$first = false; // Notice this is reused more than once, but a single var works fine | |
continue; // Skip first child, it's blank | |
} | |
if (get_class($child->firstChild) == 'DOMText') { | |
$cities[] = array('Name' => $child->textContent); |
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
crisp ~ # ls /dev/sd* | |
/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sde2 /dev/sdf /dev/sdg | |
crisp ~ # fdisk -l /dev/sde | |
Disk /dev/sde: 465.8 GiB, 500107862016 bytes, 976773168 sectors | |
Units: sectors of 1 * 512 = 512 bytes | |
Sector size (logical/physical): 512 bytes / 4096 bytes | |
I/O size (minimum/optimal): 4096 bytes / 4096 bytes | |
Disklabel type: dos | |
Disk identifier: 0xeb056c95 |