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
#!/usr/bin/python2 | |
# | |
# Buildbot monitor | |
# Author: Leandro A. F. Pereira <leandro@profusion.mobi> | |
# | |
# Copyright (C) 2010 ProFUSION Embedded Systems | |
# | |
import urllib | |
import BeautifulSoup |
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
3340 accept4(15, <unfinished ...> | |
3341 <... nanosleep resumed> NULL) = 0 | |
3341 nanosleep({3, 0}, NULL) = 0 | |
3341 nanosleep({4, 0}, <unfinished ...> | |
3340 <... accept4 resumed> 0, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 16 | |
3340 write(14, "\20\0\0\0", 4) = 4 | |
3345 <... epoll_wait resumed> {{EPOLLIN, {u32=0, u64=0}}}, 1024, -1) = 1 | |
3340 accept4(15, <unfinished ...> | |
3345 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 18 | |
3345 fstat(18, {st_mode=S_IFREG|0644, st_size=2015, ...}) = 0 |
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
#!/bin/sh | |
exec wrk -H 'Host: localhost' \ | |
-H 'Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ | |
-H 'Connection: keep-alive' \ | |
-d 10 \ | |
-c 1000 \ | |
--timeout 16384 \ | |
-t 4 \ | |
http://127.0.0.1:8080/hello \ |
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
#!/usr/bin/python | |
import mraa | |
import time | |
import pyupm_i2clcd | |
import pyupm_grove | |
import SimpleXMLRPCServer | |
import netifaces as ni | |
import threading | |
import Queue |
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
/* | |
* ---------------------------------------------------------------------------- | |
* "THE MATE-WARE LICENSE" (Revision 42): <leandro@tia.mat.br> wrote this | |
* file. As long as you retain this notice you can do whatever you want | |
* with this stuff. If we meet some day, and you think this stuff is worth | |
* it, you can buy me a Club-Mate in return. Leandro Pereira | |
* ---------------------------------------------------------------------------- | |
*/ | |
#include <arpa/inet.h> |
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
#!/usr/bin/python | |
import math | |
def pack_bits(*bits): | |
n = 0 | |
max_n = 1 | |
for value, prime_for_value in bits: | |
while n % prime_for_value != value: |
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 <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 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 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 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 <stdbool.h> | |
#include <stdlib.h> | |
struct task { | |
void *(*cb)(void *data); | |
void *data; | |
bool runnable; | |
}; |
OlderNewer