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
LRESULT CALLBACK EditWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |
{ | |
switch (message) { | |
case WM_KEYDOWN: | |
switch(wParam) { | |
case 'A': // Ctrl+A = select all | |
if(GetKeyState(VK_CONTROL) & 0x8000) { | |
SendMessage(hWnd, EM_SETSEL, 0, -1); | |
} | |
break; |
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
# DSLRlapse | |
# AVR Net-IO plugin | |
# Copyright (C) 2011 Marian Beermann | |
# Copyright (C) 2012 Marian Beermann | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
class DynamicProxy(object): | |
class Task(object): | |
fn = None | |
args = list() | |
kwargs = dict() | |
def __init__(self, target, target_proxy=None): | |
self._target = target | |
self._methods = inspect.getmembers(target, inspect.ismethod) | |
print "Methods: %s" % self._methods |
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
Displaying the HID stream without any decoding (not so helpful): | |
# od -t x1 -v --width=7 /dev/hidraw0 | |
Example packet: | |
01 Start | |
00 Position data | |
00 Position data | |
00 Position data | |
00 Position data | |
00 Keys on top |
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 python2 | |
# coding=utf-8 | |
# Copyright (C) 2012 Marian Beermann | |
# | |
# This program is free software: you can rediunicodeibute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 python3 | |
# 4chan downloader | |
# Copyright (C) 2012 Marian Beermann | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
digraph posting { | |
subgraph cluster_post { | |
label="Wie Beiträge verfasst werden"; | |
"Beitrag lesen" | |
-> "Beitrag verstehen" | |
-> "Unklare Wörter nachschlagen" | |
-> "[zitieren] drücken" |
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> | |
int main(void) | |
{ | |
DDRB = 0x02; | |
PORTB = 0x00; | |
while(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
void gps_init() | |
{ | |
FIL nmea; | |
uint16_t last_size = eeprom_read_word(&ee_init_size); | |
if(f_open(&nmea, "/initseq.txt", FA_READ) == FR_OK) { | |
uint16_t size = f_size(&nmea); | |
if(size > 1024) { | |
// Use EEPROM block, sequence in file is too large |
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 python3 | |
import os | |
from urllib.request import urlretrieve | |
stories = { | |
"see": (".gif", 84), | |
"order": (".gif", 744), | |
"vattu": (".png", 354), | |
} | |
other_ext = [".gif", ".png"] |