Skip to content

Instantly share code, notes, and snippets.

Avatar

Lukas Rieder Overbryd

View GitHub Profile
@Overbryd
Overbryd / apply-patch.md
Last active Oct 7, 2020
The following describes the necessary steps to apply a git patch on a repository export
View apply-patch.md

Assuming you have a <workdir> directory, that contains the unzipped contents of a repository export/tarball. That directory is called <repository export>.

  • Enter the directory of the repository export

    $ cd <workdir>/<repository export>
  • Initialize an empty git-repository on the export

@Overbryd
Overbryd / Windows10-Setup.ps1
Created Apr 5, 2020 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
View Windows10-Setup.ps1
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
View statsdbeat.diff
diff --git a/beater/statsdparser.go b/beater/statsdparser.go
index 24727e7..6bf5c65 100644
--- a/beater/statsdparser.go
+++ b/beater/statsdparser.go
@@ -33,8 +33,8 @@ func ParseBeats(msg string) ([]beat.Event, error) {
func parseBeat(msg string) ([]beat.Event, error) {
parts := strings.Split(msg, "|")
- if len(parts) < 2 || len(parts) > 3 {
- return nil, fmt.Errorf("Expecting 2 or 3 parts of | but was %d", len(parts))
@Overbryd
Overbryd / unbound.conf
Created Mar 29, 2019
A pretty good unbound.conf, DNSSEC, caching and local forwarding
View unbound.conf
remote-control:
control-enable: yes
server:
do-ip6: no
do-ip4: yes
do-udp: yes
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
num-threads: 4
# Enable logs
verbosity: 1
@Overbryd
Overbryd / best-brownies-of-your-life.md
Last active Feb 28, 2019
These are the best brownies of your life
View best-brownies-of-your-life.md

Best brownies of your life

This is a really great brownie recipe, originally taken from this BuzzFeed article. Here, have my version of it, without all the fuzz and ads.

Ingredients

  • 1 1/4 Cups butter
  • 225g chocolate 60-70%
  • 3/4 Cups dark processed cocoa powder
  • 1 Tbsp espresso powder
View ofx-response.html
<!DOCTYPE html>
<!--[if IE 8]><html lang="en-AU" class="lt-ie10 lt-ie9 ie8" data-ip="213.191.37.189"><![endif]-->
<!--[if IE 9]><html lang="en-AU" class="lt-ie10 ie9" data-ip="213.191.37.189"><![endif]-->
<!--[if gt IE 9]><!-->
<html lang="en-AU">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info = {"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"e98d301b90","applicationID":"130279243","transactionName":"M1IDMkpYWBBVAk0KXwoYLDB7FmUKQARaDEIBdA4ITEtZD1gES0x5ClMEHg==","queueTime":0,"applicationTime":658,"agent":"","atts":""}</script><script type="text/javascript">(window.NREUM||(NREUM={})).loader_config={xpid:"VQYGVF9aCxABV1FQAAgFUlc="};window.NREUM||(NREUM={}),__nr_require=function(t,n,e){function r(e){if(!n[e]){var o=n[e]={exports:{}};t[e][0].call(o.exports,function(n){var o=t[e][1][n];return r(o||n)},o,o.exports)}return n[e].exports}if("function"==type
View install.log
> phantomjs-prebuilt@2.1.16 install /usr/src/app/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
Received 4538K total.
Extracting tar contents (via spawned process)
View Dockerfile
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
View inheritance-spec.diff
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 May 4, 2021
Cloudflare Fragment Caching
View 0-README.md

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