Skip to content

Instantly share code, notes, and snippets.

View PaulCampbell's full-sized avatar

@paulcampbell_ PaulCampbell

  • UK
View GitHub Profile

Use HTML, CSS and javascript to create a web page with a piano keyboard. When you press the keys, the corresponding notes should play

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Piano Keyboard</title>
    <link rel="stylesheet" href="style.css">
  </head>

Building websites with isomorphic rendering...

Been messing around with that Next.js thing. Some thoughts

Getting Data

If you want to use exactly the same view code for browser and server, the browser must be able to get data the same way as the server does.

This means when rendering on the server, you can't really ask the database for data. You have to call a http end point the same as the client does. This forces you to do all data access through a http API.

From: Zabbo, August
Sent: Wednesday, January 27, 2016 5:16 PM
To: Zabbo, August
Subject: Business Deal
Hello,
I am sincerely Sorry for bugging into your privacy, it's due to a business deal. l am Mr. Liu Jun, Chief Risk Officer and Executive Director Wing Lung Bank in Hong Kong, i want to present you as the owner of Forty-Nine million five hundred dollars In my bank since l am the only one aware of the funds due to my investigations.
I want you to also invest the money in your country for the both of us for mutual benefits which we shall share in an agreed ratio. I would provide you with all the necessary documents and information needed to accomplish this deal once i hear from you more information would be sent to you, Because of my position in office, please endeavor to keep to yourself issue concerning this proposal. If you are interested, kindly get back to me with your full contact information's and phone number.
@PaulCampbell
PaulCampbell / index.js
Created December 29, 2014 14:03
requirebin sketch
var _ = require('lodash')
var plastiq = require('plastiq')
var h = plastiq.html;
var bind = plastiq.bind;
var model = {
query: '',
contacts: [
{name: "Paul"},
{name: "Levan"},
@PaulCampbell
PaulCampbell / index.js
Last active August 29, 2015 14:12
requirebin sketch
var _ = require('lodash')
var plastiq = require('plastiq')
var h = plastiq.html;
var bind = plastiq.bind;
var model = {
query: '',
contacts: [
{name: "Paul"},
{name: "Levan"},
@PaulCampbell
PaulCampbell / index.js
Created December 29, 2014 13:03
requirebin sketch
var _ = require('lodash')
var plastiq = require('plastiq')
var h = plastiq.html;
var bind = plastiq.bind;
var recognition = new webkitSpeechRecognition();
var model = {
query: '',
contacts: [
@PaulCampbell
PaulCampbell / index.js
Created December 28, 2014 23:17 — forked from refractalize/index.js
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
var bind = plastiq.bind;
function render(model) {
return h('div.asdasd',
h('label', "what's your name?"),
h('input', {type: 'text', model: bind(model, 'name')}),
h('div', 'hi ' + model.name)
);
@PaulCampbell
PaulCampbell / index.js
Created December 28, 2014 23:12
requirebin sketch
var plastiq = require('plastiq')
var h = plastiq.html;
var bind = plastiq.bind;
var recognition = new webkitSpeechRecognition();
var model = {query: ''}
function voiceSearch() {
return new Promise(function (result) {
@PaulCampbell
PaulCampbell / gist:6544357
Created September 12, 2013 21:50
There;s 143 characters. Which goes into 11 13 times.
AWVLIQIQVTQOS
QOELGCVIIQWDL
CUQEEOENNWWOA
OLTDNUQTGAWTS
MDOQTLAOQSDCH
PQQIQDQQTQOOT
UDBNIQHBHHTDU
TEETFDUEAUMOR
ESQEQEMLTMETI
RECLICAIQATUN
Having a wee bit o trouble with the async paradigm?