Skip to content

Instantly share code, notes, and snippets.

View mmdumi's full-sized avatar

Mihai Dumitrache mmdumi

View GitHub Profile
@mmdumi
mmdumi / gist:5376026
Created April 12, 2013 23:34
Pebble watchface inspired by Phosphor watch. Screenshot: http://c.wip.ro/image/263O2t2q2n1D
#include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#include "resource_ids.auto.h"
#define MY_UUID { 0xCE, 0xC0, 0x94, 0xD9, 0xE7, 0xC8, 0x4E, 0xFA, 0xB8, 0xAD, 0xA1, 0x41, 0xC8, 0x6A, 0x7D, 0xB0 }
PBL_APP_INFO(MY_UUID,
"Phosphor", "Wip Interactive",
1, 0, 0,
@mmdumi
mmdumi / EncodePolyline
Created November 2, 2012 09:09
Encode polyline. Google Maps API v3 algorithm. Objective c.
+ (NSString *)encodeStringWithCoordinates:(NSArray *)coordinates
{
NSMutableString *encodedString = [NSMutableString string];
int val = 0;
int value = 0;
CLLocationCoordinate2D prevCoordinate = CLLocationCoordinate2DMake(0, 0);
for (NSValue *coordinateValue in coordinates) {
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];