Skip to content

Instantly share code, notes, and snippets.

View blackymetal's full-sized avatar

Ariel Patino blackymetal

View GitHub Profile
@blackymetal
blackymetal / mysqldump to csv
Created September 15, 2014 19:05
Dumps database/table to csv with filters
mysqldump -uroot -T/path/ database table --where="field = 'value"
@blackymetal
blackymetal / Measure response time with curl
Last active June 22, 2021 09:19
How to measure request/response time with curl
curl -w "@curl-format.txt" -o /dev/null -s http://www.aduanacol.com
#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;
@blackymetal
blackymetal / compile_udf_mysql_mac
Last active August 29, 2015 14:04
Compiling udf mysql lib on mac
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
@blackymetal
blackymetal / blur_effect
Created July 11, 2014 23:29
blur effect with images
body {
background: url(background.jpg);
background-position: center;
background-attachment: fixed;
}
.container {
width: 500px;
height: 300px;
margin: 40px auto;
@blackymetal
blackymetal / gcc_libwebsockets
Created July 11, 2014 20:01
Compilling with libwebsockets
gcc [parameters] -I/path/to/more/headers [source files] /path/to/libwebsockets.(so|dylib)
gcc -o simple -Ilib/ test-client.c ./libwebsockets.dylib
@blackymetal
blackymetal / e-dice
Last active August 29, 2015 14:01
Arduino Electronic dice
/***************************************************
Author Arianne Patiño and Ariel Patiño
****************************************************/
#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
Adafruit_BicolorMatrix matrix = Adafruit_BicolorMatrix();
#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);
@blackymetal
blackymetal / counting objects elements
Created January 18, 2014 16:02
How many properties/elements contains an object
Object.keys(data.data).length
@blackymetal
blackymetal / Generic_Arduino_Deek_Robot
Last active January 2, 2016 21:08
Setting Arduino pro mini generic version from Deek_Robot
Select on Arduino tools
Tools > Board > Arduino Pro or Pro mini
Tools > Processor > ATmega328 (5V, 16MHZ)
Tools > Programmer > AVR ISP
When uploading a sketch first press reset button on the arduino then select Upload, once 'Uploading...' text appears realease the button.
NFC RFID-RC522
*Ardunio Uno, Arduino Pro, Arduino Pro mini