Skip to content

Instantly share code, notes, and snippets.

View othree's full-sized avatar
:accessibility:
On the way to refactoring

othree othree

:accessibility:
On the way to refactoring
View GitHub Profile
@othree
othree / dwbp.md
Created February 20, 2017 09:31
Data on the Web Best Practices
  • Metadata
    • Provide metadata
    • Provide descriptive metadata
    • Provide structural metadata
  • Data Licenses
    • Provide data license information
  • Data Provenance
    • Provide data provenance information
  • Data Quality
  • Provide data quality information
const all = Promise.all.bind(Promise);
const fetchJSON = async file => (await fetch(file)).json();
const grabData = async files => await all(files.map(fetchJSON));
(async () => {
let [data1, data2] = await grabData(['/data1.json', '/data2.json']);
})();
const all = Promise.all.bind(Promise);
const grabData = async files => await all(
(
await all(
files.map(f => fetch(f))
)
).map(v => v.json())
);
var gulp = require('gulp');
var rollup = require('rollup').rollup;
var nodeResolve = require('rollup-plugin-node-resolve');
var commonjs = require('rollup-plugin-commonjs');
var typescript = require('rollup-plugin-typescript');
var replace = require('rollup-plugin-replace');
gulp.task('default', ['bundle']);
gulp.task('bundle', function () {
:autocmd InsertEnter * let save_cwd = getcwd() | execute 'lcd %:p:h'
:autocmd InsertLeave * execute 'lcd' fnameescape(save_cwd)
setfacl -m u:http:rw $SSH_AUTH_SOCK
setfacl -m u:http:x $(dirname $SSH_AUTH_SOCK)
sudo -u http -s /bin/sh -c "env SSH_AUTH_SOCK=$SSH_AUTH_SOCK git pull"
error_page 404 /about/404/;
location / {
root /var/www/blog;
index index.php;
location ~* \.(js|css|jpg|jpeg|gif|png|ico|xsl)$ {
location ~* \.(js|css|xsl)$ {
expires 1d;
}
class Libbrotli < Formula
desc "Brotli library for decode and encode"
homepage "https://github.com/bagder/libbrotli"
url "https://github.com/bagder/libbrotli/archive/libbrotli-1.0.tar.gz"
sha256 "5b7c02eb87017e7b3886c07eca685db95fa21f9c8afbb442469370c251a54dc1"
option :universal
depends_on "libtool" => :build
depends_on "automake" => :build
{
"@context":"http://schema.org",
"@type":"Event",
"name":"g0v Summit 2016 Conference",
"url":"http://summit.g0v.tw/2016/",
"startDate":"2016-05-14T09:00:00.000+08:00",
"endDate":"2016-05-15T17:40:00.000+08:00",
"location":{
"@type":"EventVenue",
"name":"中研院人文社會科學館 / Social Sciences Building, Academia Sinica, Taipei, Taiwan",