Skip to content

Instantly share code, notes, and snippets.

View jdiez17's full-sized avatar

José Manuel Díez jdiez17

View GitHub Profile
#include <avr/pgmspace.h>
#define LAYER_TIME 3333
#define LAYER_BITS 16
#define FRAME_TIME 20
enum {
ANIMATION_SCRIPTED,
ANIMATION_RANDOM,
ANIMATION_SENSING
ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Dec 15 2013 16:36:32 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --enable-shared --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libaacplus --enable-libass --enable-libbluray --enable-libcaca --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-nonfree --enable-openal --e
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Clock.hpp>
#include <SFML/Window/Event.hpp>
#include <dlfcn.h>
#include <iostream>
#include "game.hpp"
void* handle;
CPP_FILES := $(wildcard src/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
LD_FLAGS := -lsfml-graphics -lsfml-window -lsfml-system -ldl
CC_FLAGS := -g -fPIC -std=c++11
#bin/main: $(OBJ_FILES)
# g++ $(LD_FLAGS) -o $@ $^
bin/main: libgame.so $(OBJ_FILES)
g++ $(LD_FLAGS) -o $@ obj/main.o
#ifndef TESTS_H
#define TESTS_H
#include "asic.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
void flash(asic_t *device, const uint8_t *data);
{
"Miscellaneous": {
"rleCompress": {
"sections": {
"Inputs": {
"DE": "Destination, cannot (yet) be the same location as original data",
"HL": "Data to compress",
"BC": "Size of uncompressed data"
},
"Outputs": {
$ curl -X DELETE https://mediacru.sh/api/v2/hash1,hash2,hash3
[
{"success": true, "hash": hash1},
{"success": false, "error": 404, "hash": hash2},
{"success": false, "error": 403, "hash": hash3}
]
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
jA0ECQMCYKV4GHQRz8O20kIBbbLV52E06yptnS8KOkaGCazO8frTe9UxmxvqjKlb
TpjUm9Zfqb/1Cqi2XVUHUSU9mAjXzUamSYN9yyxH8kAeMUM=
=S8j+
-----END PGP MESSAGE-----
{
'remotes': [
{
host: 'example.com',
root: '/var/prisync/',
mirror: '~/.prisync/mirrors/example.com/'
},
],
'mappings': [
local_path: '~/Documents',
func(c *Connection) manage() {
buffer := make([]byte, 1000)
for {
select {
case out := <-c.outgoing:
c.socket.Write(out)
default:
n, err := c.socket.Read(buffer)
if err != nil {