TENOR BIEL - PORTFOLIO
All prototypes, branding experiences and design concepts below are built with TypeScript, React, TailwindCSS and Framer Motion.
All prototypes, branding experiences and design concepts below are built with TypeScript, React, TailwindCSS and Framer Motion.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>How not to Scuttlebutt</title> | |
<meta charset="utf-8"> | |
<style> | |
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | |
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | |
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); |
I hereby claim:
To claim this, I am signing this object:
var http = require('http'); | |
var fs = require('fs'); | |
// write out numbers | |
function writeNumbers(res) { | |
var counter = 0; | |
} | |
// increment global, write to client | |
for (var i = 0; i < 100; i++) { | |
counter++; | |
res.write(counter.toString() + '\n'); |
var express = require('express'), | |
http = require('http'), | |
app = express(); | |
var server = http.createServer(app); | |
var timeout = 0; | |
server.setTimeout(timeout, function() { | |
server.listen(app.get('port'), function() { |
function findOrCreate(id) { | |
return Promise.try(function() { | |
return db.find(id); | |
}).then(function(result) { | |
if (result == null) { | |
return db.create(id); | |
} else { | |
return result; | |
} | |
}); |
let wm = new WeakMap(); | |
class Foo { | |
constructor () { | |
var privateData = {}; | |
wm.set(this, privateData); | |
privateData.myProperty = 1; | |
} |
findById :: User.Id -> forall s. Tx Postgres s (Maybe User) | |
findById userId = do | |
result <- maybeEx [stmt| | |
SELECT id, email, created_at, updated_at | |
FROM users | |
WHERE id = $userId | |
|] | |
return case result of | |
Just row -> toUser row |
function archiveWeeks(tasks) { | |
return lodash.chain(tasks) | |
.reverse() | |
.groupBy({created_at} => new Date(created_at.getFullYear(), created_at.getMonth(), created_at.getDate())) | |
.map((t, d) => {date: new Date(d), tasks: t}) | |
.groupBy(weekOf) // because I'm lazy | |
.map((d, w) => {week: w, days: d}) | |
.value(); | |
} |