Skip to content

Instantly share code, notes, and snippets.

View leecrossley's full-sized avatar

Lee Crossley leecrossley

View GitHub Profile
@leecrossley
leecrossley / request-code.ts
Created September 8, 2022 17:32
Auth0 passwordless example (react native)
auth0.auth
.passwordlessWithSMS({
phoneNumber: "+447555555555", // validate input - format +44
send: "code",
})
.then(goToVerifyCode)
.catch(() => {
Alert.alert(
"We're sorry!",
"We couldn't send your code, please check your number and try again.",
@leecrossley
leecrossley / ss.txt
Last active August 29, 2015 14:19
Sprint Social Description
*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 December 8, 2014 13:47
requirebin sketch
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 August 6, 2014 16:04
Getting a country dialling/calling code for a phone number
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 August 29, 2015 14:03
Android app phones only (not tablets)
<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 June 13, 2014 11:23
Data HTTP request with localStorage cache (and expiry)
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;

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 August 6, 2013 23:02
A CodePen by Lee Crossley. Social Icons with Hover - Using LESS and FontAwesome
<!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 July 18, 2013 08:48
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.
<canvas id="user-icon" width="256" height="256"></canvas>
@leecrossley
leecrossley / index.html
Created July 17, 2013 07:54
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/
<canvas id="user-icon" width="256" height="256"></canvas>