Skip to content

Instantly share code, notes, and snippets.

View matthewtole's full-sized avatar

Matthew Tole matthewtole

View GitHub Profile
@matthewtole
matthewtole / gcolor.js
Created February 26, 2015 23:39
GColor utilities for PebbleKit JS
/*
GColor
A small utility library for dealing with GColor in the new PebbleSDK.
----------------------
The MIT License (MIT)
Copyright © 2015 Matthew Tole
Permission is hereby granted, free of charge, to any person obtaining a copy
@matthewtole
matthewtole / wscript
Last active August 29, 2015 13:56
wscript build configuration for Hearts.
import json
import os
from sh import karma
from sh import uglifyjs
from sh import jshint
top = '.'
out = 'build'
def options(ctx):
#include <pebble.h>
#include "scroll-text-layer.h"
#define MAX_HEIGHT 2000
#define PADDING_X 4
#define PADDING_Y 4
struct ScrollTextLayer {
TextLayer* text_layer;
ScrollLayer* scroll_layer;
/***
* Data Processor
* Copyright © 2014 Matthew Tole
***/
#include <pebble.h>
#include "data-processor.h"
static char* data_start = NULL;
static char* data_pos = NULL;
@matthewtole
matthewtole / font-loader.c
Last active December 30, 2015 09:49
Font Loader
/***
* Font Loader
* Copyright © 2013 Matthew Tole
*
* 1.0.0
***/
#include <pebble.h>
#include "font-loader.h"
/***
* Message Queue
* Copyright © 2013 Matthew Tole
*
* Version 1.0.0
***/
#include <pebble.h>
#include "message-queue.h"
@matthewtole
matthewtole / bitmap-loader.c
Last active April 21, 2016 01:23
Bitmap Loader
/***
* Bitmap Loader
* Copyright © 2013 Matthew Tole
*
* Version 2.0.2
***/
#include <pebble.h>
#include "bitmap-loader.h"
@matthewtole
matthewtole / clock-layer.c
Last active December 29, 2015 16:39
Clock Layer - A layer class for display the time and date in Pebble apps.
/***
* Clock Layer
* Copyright © 2013 Matthew Tole
***/
#include <pebble.h>
#include "clock-layer.h"
struct ClockLayer {
TextLayer* text_layer;
@matthewtole
matthewtole / pebble-assist.h
Last active December 29, 2015 16:39
Pebble Assist - A collection of utility macros to make Pebble app development a bit simpler.
/***
* Pebble Assist
* Copyright (C) 2014 Matthew Tole
*
* Version 0.2.0
***/
/**
The MIT License (MIT)
@matthewtole
matthewtole / make.sh
Created November 7, 2013 00:17
Sample build script for a Pebble SDK 2.0 app using Javascript.
jshint js/main.js || { exit 1; }
jshint pebble/appinfo.json || { exit 1; }
uglifyjs js/libs/firebase.js js/libs/superagent.js js/main.js -o pebble/src/js/pebble-js-app.js
cd pebble
pebble clean
pebble build || { exit 1; }
rm src/js/pebble-js-app.js || { exit 1; }
if [ "$1" = "install" ]; then
pebble install --logs
fi