Skip to content

Instantly share code, notes, and snippets.

View AshKyd's full-sized avatar
🐳
a frood who really knows where his towel is

Ash Kyd AshKyd

🐳
a frood who really knows where his towel is
View GitHub Profile
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
@jayne-mast
jayne-mast / Arduino 8x8 LED alphabet
Last active November 17, 2022 02:29
All letters of the alphabet for a 8x8 LED grid
const byte a[8]={B00111100,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B01000010};
const byte b[8]={B01111100,B01000010,B01000010,B01111100,B01000010,B01000010,B01000010,B01111100};
const byte c[8]={B00111110,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B00111110};
const byte d[8]={B01111100,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B01111100};
const byte e[8]={B01111110,B01000000,B01000000,B01111000,B01000000,B01000000,B01000000,B01111110};
const byte f[8]={B01111110,B01000000,B01000000,B01111000,B01000000,B01000000,B01000000,B01000000};
const byte g[8]={B00111100,B01000010,B01000010,B01000000,B01001110,B01000010,B01000010,B00111100};
const byte h[8]={B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B01000010};
const byte i[8]={B01111100,B00010000,B00010000,B00010000,B00010000,B00010000,B00010000,B01111100};
const byte j[8]={B00000010,B00000010,B00000010,B00000010,B00000010,B00000010,B01000010,B00111100};
@cathylill
cathylill / app-arch-mercury.md
Last active August 29, 2015 14:21
Architecting an application with MercuryJS

Architecting an application with Mercury.js

Mercury.js is not opinionated about your application architecture - it's components can be used independendently, with the mercury library adding a small amount of bootsrapping and event wiring sugar. The notes given here are just one example of how you could architect an application built with Mercury.js, and will hopefully address some of the questions you may have about implementations that are more complex than the documented examples.

This article will cover some of the key components you need to create a fully featured app and gives an example of how to structure those components in such a way as to keep your app clearly understandable and maintainable for humans.

Modularised Data store

Create a core app state object that contains top level paramaters. Child data stores are generated by individual 'store' scripts that create the store and wire up appropriate channels and methods for updating data in that store.

Each child store is initialised using mer