Skip to content

Instantly share code, notes, and snippets.

import Html exposing (Html, div, hr, text)
import Array exposing (..)
-- Some function taken directly from Array.Extra
splitAt : Int -> Array a -> ( Array a, Array a )
splitAt index xs =
-- TODO: refactor (written this way to help avoid Array bugs)
let
len =
import Html exposing (Html, div, hr, text)
import Array exposing (..)
-- Some function taken directly from Array.Extra
splitAt : Int -> Array a -> ( Array a, Array a )
splitAt index xs =
-- TODO: refactor (written this way to help avoid Array bugs)
let
len =
root@graylog:/var/log/graylog/elasticsearch# free -h
total used free shared buffers cached
Mem: 3.9G 2.0G 1.8G 344K 33M 191M
-/+ buffers/cache: 1.8G 2.0G
Swap: 0B 0B 0B
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "3001";
}
# This forces us to cache origin responses forever (since we are manually invalidating the cache)
sub vcl_backend_response {
if (beresp.http.Cache-Control == "no-cache") {
set beresp.ttl = 31556926s;
vcl 4.0;
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "3001";
}
# This forces us to cache origin responses forever (since we are manually invalidating the cache)
sub vcl_backend_response {
vcl 4.0;
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "3001";
}
sub vcl_recv {
# Ignore no-cache directives and always cache
const shaHistory$ = O.create(o => {
const getNext = () => {
revwalk.next()
.then(value => {
if (value) {
o.onNext(value);
getNext();
} else {
o.onCompleted();
}
/**
* Update a style in the stylesheet. This is very unfunctional, but unfortunately due to Javascript's ridiculous array-like
* objects this is the only efficient way to do it.
*
* @param {Document} doc
* @param {string} cssSelector
* @param {(style: CSSStyleDeclaration) => void} updater
* @returns {boolean}
*/
function updateStyleRule(doc: Document, cssSelector: string, updater: (style: CSSStyleDeclaration) => void): boolean {
module ListMap exposing
( get
, set
)
import List.Extra exposing (find, dropWhile)
type alias ListMap key value =
List (key, value)
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ gulp
/vagrant/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
→ /vagrant/node_modules/libxmljs/build/xmljs.node
→ /vagrant/node_modules/libxmljs/build/Debug/xmljs.node
→ /vagrant/node_modules/libxmljs/build/Release/xmljs.node
→ /vagrant/node_modules/libxmljs/out/Debug/xmljs.node