Skip to content

Instantly share code, notes, and snippets.

//
// main.c
// kun
//
// Created by Martin Knoll on 17.10.12.
// Copyright (c) 2012 Martin Knoll. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
require "azure"
require "net/http"
require 'active_support/inflector'
require "random-word"
Azure.configure do |config|
config.account_name = "martinmd"
config.access_key = "P9m7mlh1+jDAcRKvj8PV0pTRuL+2qHJ/YNdRn1YRRpfMwSNSh/QRFoqk3gMM5gqrSZcE3au13mvdbyfrd0vkUg=="
end
class Array
def comprehend &block
return self unless block
head, *tail = self.map(&:to_a)
return head.map(&block).compact if tail.empty?
return head.product(*tail).map(&block).compact
end
end
def sieve list
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@maknoll
maknoll / gist:6441231
Created September 4, 2013 18:55
conf-gtksourceview
paparazzi master clean % opam install conf-gtksourceview
The following actions will be performed:
- install conf-gtksourceview.2
1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
=-=-= Installing conf-gtksourceview.2 =-=-=
Building conf-gtksourceview.2:
pkg-config gtksourceview-2.0
The compilation of conf-gtksourceview.2 failed.
Uninstalling conf-gtksourceview.2.
diff --git a/src/luftboot.c b/src/luftboot.c
index d83cd52..730c420 100644
--- a/src/luftboot.c
+++ b/src/luftboot.c
@@ -483,7 +483,7 @@ int main(void)
gpio_init();
- systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
+ systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
TARGET = hid.elf
CC = arm-none-eabi-gcc
AR = arm-none-eabi-ar
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
SIZE = arm-none-eabi-size
CFLAGS += -DNDEBUG -DCORE_M4 -D__USE_CMSIS -D__LPC43XX__ -mcpu=cortex-m4 -mthumb -Os -Wall