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 <string.h> | |
void swap(int *, int *); | |
main() { | |
int px, py; | |
px = 1; | |
py = 2; | |
printf("%d %d\n", px, py); | |
swap(&px, &py); |
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
/*************************************************** | |
Author Arianne Patiño and Ariel Patiño | |
****************************************************/ | |
#include <Wire.h> | |
#include "Adafruit_LEDBackpack.h" | |
#include "Adafruit_GFX.h" | |
Adafruit_BicolorMatrix matrix = Adafruit_BicolorMatrix(); |
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
gcc [parameters] -I/path/to/more/headers [source files] /path/to/libwebsockets.(so|dylib) | |
gcc -o simple -Ilib/ test-client.c ./libwebsockets.dylib |
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
body { | |
background: url(background.jpg); | |
background-position: center; | |
background-attachment: fixed; | |
} | |
.container { | |
width: 500px; | |
height: 300px; | |
margin: 40px auto; |
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
Before make sure ldflag is set to mysqld with: | |
mysqlbug | |
gcc -bundle -v -o levenshtein.so levenshtein.c -undefined dynamic_lookup -I/usr/local/mysql/include |
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 <string.h> | |
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy); | |
float buffx[3]; | |
float buffy[3]; | |
main() | |
{ | |
buffx[0] = 1.0; buffy[0] = 1.0; |
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
curl -w "@curl-format.txt" -o /dev/null -s http://www.aduanacol.com |
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
mysqldump -uroot -T/path/ database table --where="field = 'value" |
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
watch tail -n 15 /usr/local/mysql/data/ArielMac.log |
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
private function put($data) { | |
// Open connection | |
$ch = curl_init(); | |
$url = 'http://127.0.0.1:9200/colombia/bogota/'.$data['id']; | |
// Set the url, number of POST vars, POST data | |
curl_setopt( $ch, CURLOPT_URL, $url ); | |
// curl_setopt( $ch, CURLOPT_POST, true ); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); |