Skip to content

Instantly share code, notes, and snippets.

@githubnemo
githubnemo / foo.cpp
Last active November 27, 2019 09:06
const int SCK_PIN = 5;
const int RCK_PIN = 9;
const int NOE_PIN = 8;
const int DIN_PIN = 6;
const int WTF_PIN = 3;
static void cycle_sck(void) {
digitalWrite(SCK_PIN, HIGH);
//delay(1);
digitalWrite(SCK_PIN, LOW);
/*
Code adapted from http://reibot.org/2011/08/07/intro-to-boost-converter/.
Tested with an Arduino Pro Mini.
*/
const int pwm_pin = 0;
const int fb_pin = 24;
const int manual = 0;
void setup(){
DDRD |= (1<<PD6);
@githubnemo
githubnemo / main.go
Created October 8, 2015 23:17
Fake gravatar daemon for Geary (or other stuff)
package main
import (
"net/http"
"log"
"image"
"image/png"
"image/color"
"strconv"
)
@githubnemo
githubnemo / gist:6599620
Last active December 23, 2015 07:19
defer from go for scala
object deferTest extends App {
class DeferTracker() {
class LazyVal[A](val value:() => A)
private var l = List[LazyVal[Any]]()
def apply(f: => Any) = { l = new LazyVal(() => f) :: l }
def makeCalls() = l.foreach { x => x.value() }
}
@githubnemo
githubnemo / README.md
Last active December 23, 2015 03:38
Font patch for openjdk-7