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> | |
typedef void (*NativeFunction)(int *ip); | |
typedef struct _Instruction Instruction; | |
struct _Instruction { | |
unsigned int opcode; | |
unsigned long parameter; | |
}; |
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
class SCDQ5541 { | |
private: | |
int m_clock, m_data, m_load; | |
void bitbang(unsigned char code) | |
{ | |
digitalWrite(m_load, LOW); | |
for (int i = 0; i < 8; i++) { | |
digitalWrite(m_clock, LOW); | |
digitalWrite(m_data, code & 0x01); |
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
static const byte charlie_pins[] = {5, 6, 7}; | |
static const byte charlie_led[][2] = { | |
{ 0, 1 }, | |
{ 1, 0 }, | |
{ 0, 2 }, | |
{ 2, 0 }, | |
{ 1, 2 }, | |
{ 2, 1 } | |
}; |
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
// Ebay RFID decoder by Aaron Christiansen | |
// Original article: http://thetransistor.com/2011/10/hacking-cheap-rfid-readers/ | |
// Optimizations by Leandro Pereira | |
// NOTE: this uses the NewSoftwareSerial beta 11 | |
// by Mikal Hart, available here: | |
// http://arduiniana.org/2011/01/newsoftserial-11-beta/ | |
#include <SoftwareSerial.h> |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <ucontext.h> | |
typedef struct coro_t_ coro_t; | |
typedef struct thread_t_ thread_t; | |
typedef int (*coro_function_t)(coro_t *coro); | |
typedef enum { | |
CORO_NEW, |
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
/* | |
* Pinball Display Driver | |
* Arudino version by Leandro Pereira | |
* | |
* Based on code by Daniel Quadros, available at | |
* http://dqsoft.blogspot.com.br/2011/06/projeto-epoch-parte4-software-cont.html | |
*/ | |
#define DISP_S0 8 | |
#define DISP_S1 9 |
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
/* | |
* Partial applied functions in C | |
* Leandro Pereira <[email protected]> | |
*/ | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdbool.h> |
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
┌───┬───┬───┬───┬───┬───┬───┐ | |
└─┐ │ │ ─┤ │ │ │ ─┤ | |
│ │ │ ├─ │ ─┤ │ │ │ │ ┌─┘ | |
└─┴───┴───┴───┴───┴─┴─┴─┘ | |
2013-06-01 LHC, Campinas - São Paulo | |
A Tosconf é uma desconferência anual organizada pelo Laboratório | |
Hacker de Campinas (LHC). Em sua primeira edição, em 2012, atraiu | |
desenvolvedores, pesquisadores de segurança da informação e | |
figuras míticas da computação. |
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 <assert.h> | |
#include <sys/types.h> | |
#include <dirent.h> | |
#include "lwan-status.h" | |
#include "lwan-template.h" | |
#include "strbuf.h" | |
struct file_list { | |
const char *path; |
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
namespace { | |
const char segment_pin[7] = { | |
[0] = 0, | |
[1] = 0, | |
[2] = 0, | |
[3] = 0, | |
[4] = 0, | |
[5] = 0, | |
[6] = 0, |
OlderNewer