Skip to content

Instantly share code, notes, and snippets.

@sandfox
sandfox / app.js
Last active December 16, 2015 11:29 — forked from eladb/app.js
var http = require('http');
http.createServer(function(req, res) {
if (req.url === '/mysupersecretdeploymentendpoint' && req.method === 'POST') {
console.log('Post-receive trigger');
var body = '';
req.on('data', function(data){
body += data;
})
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

@sandfox
sandfox / a.js
Last active January 20, 2017 10:23 — forked from anonymous/a.js
const genericPool = require("generic-pool");
const factory = {
create: function() {
return new Promise(function(resolve, reject){
setTimeout(function(){
reject(new Error('cannot create resource'))
}, 1000)
})
},
@sandfox
sandfox / update-status.sh
Created October 9, 2017 16:00 — forked from ecstasy2/update-status.sh
Bash script to update github commit status
#!/bin/bash
set -e
# Usage: ./update-status.sh --sha=somesha \
# --repo=edyn/service-identity \
# --status=pending \
# --message="Starting tests" \
# --context=edyn/e2e \
# --url=http://something.com