Skip to content

Instantly share code, notes, and snippets.

View rknightuk's full-sized avatar

Robb Knight rknightuk

View GitHub Profile
@daviddarnes
daviddarnes / index.njk
Created June 1, 2019 08:02
Eleventy blog from API
<h1>API post list</h1>
<ul>
{% for post in posts %}
<li>
<a href="/posts/{{ post.id }}/">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
@oliveratgithub
oliveratgithub / emojis.json
Last active July 21, 2024 14:56
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@remy
remy / index.js
Created November 28, 2016 12:11
A small demo of how to create a "next bus" service based on scraping a specific bus service page, and displaying in a LaMetric compatible format.
// follow modules loaded via `npm i --save request cheerio`
const request = require('request');
const cheerio = require('cheerio');
const http = require('http');
http.createServer((req, res) => {
getDueTimes().then(data => {
res.writeHead(200, { 'content-type': 'application/json' });
res.end(JSON.stringify(data));
}).catch(error => {
@daviddarnes
daviddarnes / _config.yml
Last active April 7, 2016 14:52
Jekyll head meta
# Permalinks
permalink: pretty
# Posts
excerpt_separator: <!-- more -->
# Site info
url: "https://darn.es"
title: "David Darnes"
description: "Web Designer & Front-end Developer"
@steventroughtonsmith
steventroughtonsmith / wwdc15sessionlister.m
Last active December 3, 2015 22:51
WWDC 15 Session Video Lister
//
// main.m
// wwcd15sessionlister
//
// Created by Steven Troughton-Smith on 10/06/2015.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@danharper
danharper / decorators.js
Created April 9, 2015 22:15
ES7 Decorators
@ngInject('bus', '$ionicModal')
class Adder {
constructor(num) {
this.num = num
}
// order matters
// if you @swallow first, then @log won't log caught exceptions
@log
@swallow
@paulirish
paulirish / bling.js
Last active July 23, 2024 01:12
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
@hyl
hyl / partyColors.json
Last active August 29, 2015 14:17
A JSON file full of colours for different political parties, matched to their names as they appear on YourNextMP (which is why some parties/colours are missing: feel free to suggest more!)
[
{
"name": "Alliance for Green Socialism",
"color": "#00A86B"
},
{
"name": "Alliance - Alliance Party of Northern Ireland",
"color": "#F6CB2F"
},
{
@danharper
danharper / BorderedInput.js
Last active May 16, 2016 20:31
BorderedInput, with Material design style focus animation. Preview: https://i.imgur.com/Fek7rXF.gif
// note there may be a better way to abuse flexbox than this :)
var React = require('react-native')
var { View, TextInput } = React
var BorderedInput = React.createClass({
getInitialState() {
return { i: 0 }
},
@sarfata
sarfata / pebble_fonts.h
Created September 7, 2014 21:49
Pebble fonts
#define FONT_KEY_FONT_FALLBACK "RESOURCE_ID_FONT_FALLBACK"
#define FONT_KEY_GOTHIC_14 "RESOURCE_ID_GOTHIC_14"
#define FONT_KEY_GOTHIC_14_BOLD "RESOURCE_ID_GOTHIC_14_BOLD"
#define FONT_KEY_GOTHIC_18 "RESOURCE_ID_GOTHIC_18"
#define FONT_KEY_GOTHIC_18_BOLD "RESOURCE_ID_GOTHIC_18_BOLD"
#define FONT_KEY_GOTHIC_24 "RESOURCE_ID_GOTHIC_24"
#define FONT_KEY_GOTHIC_24_BOLD "RESOURCE_ID_GOTHIC_24_BOLD"
#define FONT_KEY_GOTHIC_28 "RESOURCE_ID_GOTHIC_28"
#define FONT_KEY_GOTHIC_28_BOLD "RESOURCE_ID_GOTHIC_28_BOLD"
#define FONT_KEY_BITHAM_30_BLACK "RESOURCE_ID_BITHAM_30_BLACK"