Skip to content

Instantly share code, notes, and snippets.

Avatar
🆑

Chris Lewis C-D-Lewis

🆑
View GitHub Profile
@C-D-Lewis
C-D-Lewis / headlines.js
Created May 17, 2017
Vector watch News Headlines widget
View headlines.js
"use strict";
debugger;
var VectorWatch = require('vectorwatch-sdk');
var request = require('request');
var vectorWatch = new VectorWatch();
var logger = vectorWatch.logger;
// ----------------------------------- News ------------------------------------
@C-D-Lewis
C-D-Lewis / sparkStepper.cpp
Created May 5, 2017 — forked from technobly/sparkStepper.cpp
Spark Core Stepper Library
View sparkStepper.cpp
//-----------------------------------------------//
// STEPPER LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
/*
@C-D-Lewis
C-D-Lewis / sparkLiquidCrystal.cpp
Created May 5, 2017 — forked from technobly/sparkLiquidCrystal.cpp
LiquidCrystal LIBRARY for SPARK CORE
View sparkLiquidCrystal.cpp
//-----------------------------------------------//
// LIQUIDCRYSTAL LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
@C-D-Lewis
C-D-Lewis / policy.txt
Created Feb 11, 2017
Wristponder Privacy Policy
View policy.txt
Wristponder Privacy Policy
==========================
Wristponder requires use of some sensitive user data in order to perform as expected.
Under no circumstances does any of this data leave the device, except when the user uses
the 'Report' debug log feature to help debug problems in collaboration with the developer.
In this case the information is never used for any purpose except to diagnose and fix bugs.
The permissions required to access this data are shown below, with explanations as to their
@C-D-Lewis
C-D-Lewis / get-sdks.js
Created Dec 11, 2016
Download all Pebble SDK core packages
View get-sdks.js
var request = require('request');
var https = require('https');
var fs = require('fs');
var URL = 'https://sdk.getpebble.com/v1/files/sdk-core';
var OUTPUT_DIR = './sdks';
if(!fs.existsSync(OUTPUT_DIR)){
fs.mkdirSync(OUTPUT_DIR);
}
@C-D-Lewis
C-D-Lewis / Pebble API documentation
Created Dec 1, 2016
Pebble appstore api (Unofficial)
View Pebble API documentation
--- Pebble API Documentation ---
NOTE: api2.getpebble.com and appstore-api.getpebble.com both appear to point to the same API
App Banners, Categories & Collections: https://api2.getpebble.com/v2/home/apps
Watchface Banners, Categories & Collections: https://api2.getpebble.com/v2/home/faces
All apps: https://api2.getpebble.com/v2/apps/collection/all/watchapps-and-companions
@C-D-Lewis
C-D-Lewis / quick_view_test.sh
Created Sep 20, 2016
QuickView test script for Pebble emulator
View quick_view_test.sh
#!/bin/bash
pebble emu-set-timeline-quick-view on
sleep 1
pebble emu-set-timeline-quick-view off
@C-D-Lewis
C-D-Lewis / timeline.js
Created Jun 8, 2015
Timeline library for PebbleKit JS
View timeline.js
/******************************* timeline lib *********************************/
// The timeline public URL root
var API_URL_ROOT = 'https://timeline-api.getpebble.com/';
/**
* Send a request to the Pebble public web timeline API.
* @param pin The JSON pin to insert. Must contain 'id' field.
* @param type The type of request, either PUT or DELETE.
* @param topics Array of topics if a shared pin, 'null' otherwise.
View PebbleAccelPacket.java
public class PebbleAccelPacket {
//Data members
public int x, y, z;
/**
* Default constructor
*/
public PebbleAccelPacket() {
x = 0;
@C-D-Lewis
C-D-Lewis / main.c
Last active Aug 29, 2015
SDK Tutorial 2
View main.c
#include <pebble.h>
Window* g_window;
TextLayer *g_text_layer;
GBitmap *g_frame_bitmap;
BitmapLayer *g_frame_layer;
void window_load(Window *window)
{
//Create and add the image