Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Crossley leecrossley

View GitHub Profile
@leecrossley
leecrossley / ss.txt
Last active Aug 29, 2015
Sprint Social Description
View ss.txt
*For iPhone 6, iPhone 6 Plus & iPhone 5s* - Sprinting just got Social.
The first short distance running app - race your friends anywhere, any time. Sprint Social combines the proven benefits of short bursts of high intensity exercise with the motivation of exercising with friends, even if they're not by your side.
Sprint Social harnesses the motivation of exercising with and challenging your Facebook friends, whatever your schedule or theirs. Race side by side, or across time zones and continents. Sprint Social uses Apple's gait recognition to measure your run. That means no waiting for GPS to lock on, no worries about privacy, no difference whether you're inside on a treadmill or out on your favourite 100m stretch.
If you are looking for inspiration to keep you active and improve your fitness, Sprint Social is for you. Sprints are easy to fit into your routine. No need to pace out or find markers in each new location you exercise in, Sprint Social does that for you. To measure the distance you cover, Spri
@leecrossley
leecrossley / index.js
Created Dec 8, 2014
requirebin sketch
View index.js
var request = require("request"),
fs = require("fs");
var getPostData = function (tag) {
return {
"url": "http://admin-ci-pz.herokuapp.com/bundles/upload",
"formData": {
"tag": tag,
"bundle_file": fs.createReadStream(__dirname + "/../dist.zip")
}
@leecrossley
leecrossley / get-country-code.js
Created Aug 6, 2014
Getting a country dialling/calling code for a phone number
View get-country-code.js
var codes = [1,7,20,27,30,31,32,33,34,36,39,40,41,43,44,45,46,47,48,49,51,52,
53,54,55,56,57,58,60,61,62,63,64,65,66,81,82,84,86,90,91,92,93,94,95,98,
211,212,213,216,218,220,221,222,223,224,225,226,227,228,229,230,231,232,
233,234,235,236,237,238,239,240,241,242,243,244,245,246,248,249,250,251,
252,253,254,255,256,257,258,260,261,262,263,264,265,266,267,268,269,290,
291,297,298,299,350,351,352,353,354,355,356,357,358,359,370,371,372,373,
374,375,376,377,378,380,381,382,385,386,387,389,420,421,423,500,501,502,
503,504,505,506,507,508,509,590,591,592,593,594,595,596,597,598,599,670,
672,673,674,675,676,677,678,679,680,681,682,683,685,686,687,688,689,690,
691,692,850,852,853,855,856,870,880,886,960,961,962,963,964,965,966,967,
@leecrossley
leecrossley / AndroidManifest.xml
Last active Aug 29, 2015
Android app phones only (not tablets)
View AndroidManifest.xml
<manifest>
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
@leecrossley
leecrossley / data.js
Created Jun 13, 2014
Data HTTP request with localStorage cache (and expiry)
View data.js
var data = (function () {
var data = {};
var mins = 5;
var baseUrl = "http://.../api/";
data.get = function (key, successCb, errorCb) {
var raw = JSON.parse(localStorage.getItem(key));
if (!raw || !raw.expiry || new Date().getTime() >= raw.expiry) {
getFromApi(key, successCb, errorCb);
return;
View keybase.md

Keybase proof

I hereby claim:

  • I am leecrossley on github.
  • I am leecrossley (https://keybase.io/leecrossley) on keybase.
  • I have a public key whose fingerprint is 7C89 6B15 145B 8192 27D9 5539 42E7 FD6B DCDC 4365

To claim this, I am signing this object:

@leecrossley
leecrossley / index.html
Created Aug 6, 2013
A CodePen by Lee Crossley. Social Icons with Hover - Using LESS and FontAwesome
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"/>
</head>
<body class="wrapper">
<ul>
<li class="facebook">
@leecrossley
leecrossley / index.html
Created Jul 18, 2013
A CodePen by Lee Crossley. Avatar Generator from Name - A name (first name and surname) is input and a canvas element is output using the initials from the name and a background colour (based on the first name first letter). The background colours are from from http://flatuicolors.com/ Now with retina support.
View index.html
<canvas id="user-icon" width="256" height="256"></canvas>
@leecrossley
leecrossley / index.html
Created Jul 17, 2013
A CodePen by Lee Crossley. Avatar Generator from Name - A name (first name and surname) is input and a canvas element is output using the initials from the name and a background colour (based on the first name first letter). The background colours are from from http://flatuicolors.com/
View index.html
<canvas id="user-icon" width="256" height="256"></canvas>
@leecrossley
leecrossley / error-handler.js
Created May 29, 2013
Phonegap / Cordova - Windows Phone 8 Errors in VS output window
View error-handler.js
window.onerror = function (message, file, line) {
window.external.Notify("Error in Application: " + message + ". Source File: " + file + ", Line: " + line);
}