Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Crossley leecrossley

View GitHub Profile
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 / 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 / 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 / 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 / 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 / Happy Panda.
Created Mar 28, 2012
Panda: without context splurge, callbacks or base library.
View Happy Panda.
var panda = (function () {
var panda = {}, bambooLevel = 0, isAsleep = false;
function wakeUp() {
isAsleep = false;
}
panda.eatBamboo = function () {
bambooLevel = bambooLevel + 1;
};
View gist:2251165
<h1>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
@leecrossley
leecrossley / FuzzBuzz with CSS
Created May 7, 2012
There's no JavaScript or markup content :)
View FuzzBuzz with CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FuzzBuzz with CSS</title>
<style type="text/css">
body{counter-reset:fuzzbuzz;font-family:arial;font-size:18px;}
div{padding:10px;margin:10px;width:80px;float:left;height:30px;color:#999;text-align:center;}
div:after{content:counter(fuzzbuzz);counter-increment:fuzzbuzz;}
div:nth-child(3n):not(:nth-child(5n)):after{content:"fuzz";color:red;font-weight:bold;}
@leecrossley
leecrossley / cookieLaw.js
Created Jul 18, 2012
NICE Cookie Usage - shows a banner at the top of the page (once) if based in the EU.
View cookieLaw.js
(function ($) {
function setCookie(a, b, c) {
var d = new Date();
d.setDate(d.getDate() + c);
var e = escape(b) + ((c == null) ? "" : "; expires=" + d.toUTCString());
document.cookie = a + "=" + e;
}
function getCookie(a) {
var i, x, y, cookieArray = document.cookie.split(";");
View RDF Graph Writing
var turtleWriter = new CompressingTurtleWriter
{
HighSpeedModePermitted = true,
CompressionLevel = WriterCompressionLevel.None,
PrettyPrintMode = false
};