Skip to content

Instantly share code, notes, and snippets.

View tav's full-sized avatar

tav

View GitHub Profile
currencies: [GBP USD EUR NOK]
cache: []
<input id: amount value:: 0 />
<input id: from value:: USD />
<input id: to value:: GBP />
<div>
if $from/value not in $currencies or $to/value not in $currencies
<span class: error>"Sorry, unknown currency symbol"</span>
else
if [$from/value $to/value] not in cache

At the heart of it, the site is very much like Twitter. You type your message, press enter, and boom! It appears in the stream of everyone who is following you.

Well, it's a lot better than Twitter because your messages actually get sent in real-time. No need to click or refresh the page, new messages simply appear like with chat/IM.

There's also a separate "To:" field like with email. Here you can state that the message is to a:

===================
AMPIFY PROTOTYPE
===================
LEGEND:
[x] - Prefined properties from outer scope
{name} [x] - Predefined item
-------------------
Hub management app
The service dispatcher within the App Engine app needs to log accounting info
for the current request, e.g. `log.Infof("T:%s:queries:%d", user, n)`. This
data will later be parsed out and used for quota and billing purposes.
-------------------------------------------------------------------------------
In order to enable offline log processing, we need to implement a `/_logs`
handler on the App Engine app. This should validate against a shared secret
`key` and expose the [Log Query API] to callers.
<!doctype html>
<html>
<script>
var Crypto;
(function (Crypto) {
var SHA256 = (function () {
function SHA256() {
this.blockLength = 64;
this.digestLength = 32;
@z0w0
z0w0 / haul.md
Last active February 9, 2017 10:27
Haul, a purely functional package manager for Rust

Haul

Features

  • Purely functional
    • Different versions of packages can coexist
    • Each package must have a UUID, so packages with conflicting names can coexist
  • Build logic
    • Each package's metadata and build logic is written in a central Rust source file, package.rs
  • Dependencies are declared in the package file and will be fetched and installed before
@dchest
dchest / salsa20.js
Last active November 9, 2020 02:48
/*
IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong,
because it must be keyed with at least 128 bits of entropy, and where
do you get this entropy, huh?
- In a browser, you get it from window.crypto.getRandomValues().
- In Node, you get it from crypto.randomBytes()
Now LOOK AT YOU! You already have secure ways to generate random bytes,