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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
#include <stdio.h> | |
/* #define F_CPU 16000000UL */ | |
#define BAUD 115200L | |
#include <util/setbaud.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 <string.h> | |
#include <unistd.h> | |
#include <time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
void writestr(int fd, const char* str) { | |
write(fd, str, strlen(str)); | |
} |
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 <time.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <math.h> | |
int iso8601_time(char* buf, size_t size) | |
{ | |
struct timespec ts; | |
struct tm tm_local; | |
struct tm tm_gm; |
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
LUAOBJECT_GRAMMAR = %q{ | |
grammar LuaObject | |
rule luaobj | |
space value space { def to_ruby; value.to_ruby; end } | |
end | |
rule value | |
nil / float / number / string / table / boolean | |
end |
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/env ruby | |
def lesseq(a, b, c, d) | |
return a * d <= c * b | |
end | |
lower_numer = 2 | |
lower_denom = 1 | |
upper_numer = 3 | |
upper_denom = 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
// | |
// Rotary Encoder Driver | |
// | |
// Copyright (C) 2016 by Lars Christensen <larsch@belunktum.dk> | |
// MIT License | |
// | |
#include "rotary.hpp" | |
#include <avr/interrupt.h> | |
#include <avr/io.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
#!/bin/sh -ex | |
wget -nc http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz | |
wget -nc http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz | |
wget -nc http://llvm.org/releases/3.3/compiler-rt-3.3.src.tar.gz | |
wget -nc http://llvm.org/releases/3.3/clang-tools-extra-3.3.src.tar.gz | |
rm -rf llvm | |
mkdir -p llvm | |
tar xfz llvm-3.3.src.tar.gz -C llvm --strip-components=1 | |
mkdir -p llvm/tools/clang | |
tar xfz cfe-3.3.src.tar.gz -C llvm/tools/clang --strip-components=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
/** | |
* Attach an event listener to an object. Invokes the handle() | |
* callback on every event, and the apply() handler eventually, but | |
* with at least 'delay' milliseconds between each invokation. | |
*/ | |
function addThrottledEventHandler(elem, event, handle, apply, delay) { | |
let nextApply = performance.now(); | |
let timerId = null; | |
function invokeApply() { apply(); timerId = null; } | |
elem.addEventListener(event, (ev) => { |
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 -exu | |
sudo pacman -S --needed --noconfirm base-devel python2 expat ncurses gperf git wget unzip | |
sudo ln -sf /usr/bin/python2 /usr/bin/python | |
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git | |
cd esp-open-sdk | |
make STANDALONE=y |
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
comm -23 <(pacman -Qq|sort) <(pacman -Qqg base base-devel|xargs -n1 pactree -ul|sort -u) |