I hereby claim:
- I am samgiles on github.
- I am samgiles (https://keybase.io/samgiles) on keybase.
- I have a public key whose fingerprint is 931D 1228 A7A1 7D43 991B F823 6AA0 F17C AB7C 7B01
To claim this, I am signing this object:
// Functional Helper: When lambda returns an array, compose concat and map to return a flattened result. | |
// See https://gist.github.com/samgiles/762ee337dff48623e729 for an example | |
Array.prototype.flatMap = function(lambda) { | |
return Array.prototype.concat.apply([], this.map(lambda)); | |
}; | |
// Mock, imagine this is some function that maps a modernizr test name to the polyfill.io nomenclature, if it doesn't map, | |
// it must return the name as is. Must always be an array. | |
function getListOfPolyFillsForModernizrTest(name) { | |
var mock = { |
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
Array.prototype.flatMap = function(lambda) { | |
return Array.prototype.concat.apply([], this.map(lambda)); | |
}; |
public static void main(String[] args) { | |
Integer x = 128; | |
Integer y = 128; | |
Integer a = 127; | |
Integer b = 127; | |
if (a == b) { | |
System.out.println("a == b"); | |
} else { | |
System.out.println("a != b"); |
class Cmake < Formula | |
desc "Cross-platform make" | |
homepage "https://www.cmake.org/" | |
url "https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7.tar.gz" | |
sha256 "58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e" | |
license "BSD-3-Clause" | |
head "https://gitlab.kitware.com/cmake/cmake.git" | |
# The "latest" release on GitHub has been an unstable version before, so we | |
# check the Git tags instead. |
I hereby claim:
To claim this, I am signing this object:
/* | |
* A function that converts a PostGIS query into a GeoJSON object. | |
* Copyright (C) 2012 Samuel Giles <sam@sam-giles.co.uk> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
/** Method 1. Use a PassThrough stream */ | |
var PassThrough = require('stream').PassThrough; | |
function myAsyncContent() { | |
var myContentStream = new PassThrough(); | |
var streamPromise = getAsyncInfo().then(function(info) { | |
return createStreamFromInfo(info); | |
}); | |
CREATE TABLE poi ( | |
id SERIAL PRIMARY KEY, | |
location GEOGRAPHY(POINT, 4326), | |
address TEXT | |
); | |
CREATE INDEX poi_location_index ON poi USING gist (location); | |
CREATE TABLE "user" ( | |
id SERIAL PRIMARY KEY, |