Skip to content

Instantly share code, notes, and snippets.

@woxtu
woxtu / gist:c186b173be3a53171533
Last active March 4, 2019 05:37
Face detection in Rust
pub mod cv {
extern crate libc;
use self::libc::{c_char, c_double, c_int, c_schar, c_void};
#[repr(C)]
pub struct HaarClassifierCascade;
#[repr(C)]
pub struct MemStorage;
@austinmarton
austinmarton / recvRawEth.c
Created June 3, 2012 07:55
Receive raw Ethernet frames in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/ip.h>
@austinmarton
austinmarton / sendRawEth.c
Created February 27, 2012 08:40
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>