Skip to content

Instantly share code, notes, and snippets.

View davepeake's full-sized avatar

David Peake davepeake

View GitHub Profile
@davepeake
davepeake / Thesis Graphics Makefile
Last active October 13, 2015 03:47
A makefile for the graphics folder in my thesis, converts eps to pdf for PDFTex
# Makefile for thesis graphic files
# Turns a directory of eps files into a directory of pdf files
# (good for PDFTex, also MATLAB outputs better eps files than pdf files)
EPS = $(wildcard *.eps)
PDF = $(EPS:.eps=.pdf)
PNG = $(EPS:.eps=.png)
all: $(PDF)
@davepeake
davepeake / atof.c
Last active December 25, 2015 20:39
Simple string to float function
#include <stdio.h>
// Basic string to float function
float
atof(const char *strbuff, unsigned long ulCount)
{
float buff = 0.0;
int i;
int charval;
int dotpoint_val = 0;
@davepeake
davepeake / gist:1fd1577f93fb19513cc5
Created August 9, 2014 12:02
Adding smart playlist to Confluence XBMC
>------->-------<control type="button" id="90176">
>------->------->-------<include>ButtonHomeSubCommonValues</include>
>------->------->-------<label>Comedy</label>
>------->------->-------<onclick>PlayMedia(/home/pi/.xbmc/userdata/playlists/video/Comedy.xsp)</onclick>
>------->-------</control>
### Keybase proof
I hereby claim:
* I am davepeake on github.
* I am davepeake (https://keybase.io/davepeake) on keybase.
* I have a public key whose fingerprint is 5A6A 1461 EDAC 9A8C 9552 B3FD 6294 F589 A2CD 4B63
To claim this, I am signing this object:
@davepeake
davepeake / atmega16u4.avrdude
Created June 13, 2017 06:10
ATMega16U4 AVRDude Settings
#------------------------------------------------------------
# ATmega16u4
#------------------------------------------------------------
part
id = "m16u4";
desc = "ATmega16U4";
signature = 0x1e 0x94 0x88;
usbpid = 0x2ff4;
has_jtag = yes;
@davepeake
davepeake / datasheet.py
Created July 17, 2017 03:54
Recursively searches through a directory an looks for a given part
#!/usr/bin/python
import os
import sys
import glob
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("datasheet", help='File fragment')
@davepeake
davepeake / Makefile
Created August 6, 2019 02:17
Simple blinky C code to test writing to bare metal Arduino Uno
### Project name (also used for output file name)
PROJECT = blinky
### Source files and search directory
CSRC = blinky.c
ASRC =
VPATH =
### Target device
DEVICE = atmega328p