Skip to content

Instantly share code, notes, and snippets.

View Overbryd's full-sized avatar

Lukas Rieder Overbryd

View GitHub Profile
FROM golang:1.9-alpine
WORKDIR /app
RUN apk add --no-cache git \
&& git clone https://github.com/amenezes/golang-html5-sse-example .
VOLUME /app
EXPOSE 8080
diff --git a/elasticsearch-persistence/spec/repository/base_spec.rb b/elasticsearch-persistence/spec/repository/base_spec.rb
index fae1e7b..4a1fc4f 100644
--- a/elasticsearch-persistence/spec/repository/base_spec.rb
+++ b/elasticsearch-persistence/spec/repository/base_spec.rb
@@ -321,4 +321,22 @@ describe Elasticsearch::Persistence::Repository::Base do
it_behaves_like 'a base repository'
end
+
+ context 'when configuration changes on a descendant' do
@Overbryd
Overbryd / 0-README.md
Last active September 11, 2023 19:14
Cloudflare Fragment Caching

Cloudflare fragment rendering/caching

This worker script will evaluate your origin response, and replace html comments marked as fragment:key with a respective prefetch defined in a X-Fragments response header.

Usage

Your origin must include the X-Fragments header, specifying the a comma separated list of prefetch requests to make for that response.

< HTTP/1.1 200 OK
{
"version": "1.2.0",
"identifier": "b16ef833-89c5-481a-b4b1-ab746110cab8",
"title": "Online, do you believe that?",
"subtitle": "Looks really neat",
"language": "en_US",
"metadata": {
"generatorName": "NewsPublisher",
"generatorVersion": "1T11",
"excerpt": "Looks really neat"
@Overbryd
Overbryd / github_trending_js.html
Last active August 31, 2017 11:05
Example file that hangs myhtml
defmodule Decimal.Prefix do
defmacro __using__(_args) do
quote do
import Decimal.Prefix, only: [decimal: 1]
end
end
def overrides, do: ["+": 2, "-": 2, "*": 2, "/": 2]
## Environment
```
Bundler 1.14.3
Rubygems 2.4.5
Ruby 1.9.3p551 (2015-01-29 revision 48406) [java]
GEM_HOME /home/travis/.rvm/gems/jruby-src-1.7.19
GEM_PATH /home/travis/.rvm/gems/jruby-src-1.7.19:/home/travis/.rvm/gems/jruby-src-1.7.19@global
RVM 1.26.10 (1.26.10)
Git 1.8.5.6
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
PING 192.168.10.254 (192.168.10.254): 56 data bytes
64 bytes from 192.168.10.254: icmp_seq=0 ttl=60 time=1.840 ms
64 bytes from 192.168.10.254: icmp_seq=1 ttl=60 time=3.112 ms
64 bytes from 192.168.10.254: icmp_seq=2 ttl=60 time=2.195 ms
64 bytes from 192.168.10.254: icmp_seq=3 ttl=60 time=1.995 ms
64 bytes from 192.168.10.254: icmp_seq=4 ttl=60 time=8.466 ms
64 bytes from 192.168.10.254: icmp_seq=5 ttl=60 time=2.151 ms
64 bytes from 192.168.10.254: icmp_seq=6 ttl=60 time=6.067 ms
64 bytes from 192.168.10.254: icmp_seq=7 ttl=60 time=43.693 ms
64 bytes from 192.168.10.254: icmp_seq=8 ttl=60 time=1.801 ms
@Overbryd
Overbryd / mirror-website.sh
Created May 24, 2016 06:55
Mirror a complete website with wget
#!/bin/bash
# Mirror a complete website with wget
function mirror-website() {
local url=$@
local domain=`expr "$url" : '^http[s]*://\([^/?]*\)'`
wget \
--recursive \
--no-clobber \
--page-requisites \