Skip to content

Instantly share code, notes, and snippets.

View Overbryd's full-sized avatar

Lukas Rieder Overbryd

View GitHub Profile
@Overbryd
Overbryd / README.md
Created January 5, 2024 16:04
Containerd private registry authentication

Containerd private registry authentication (Gitlab)

  1. Obtain a private access token (or a group deploy token) with read_registry rights.
  2. Encode the username + token $ echo -n 'USERNAME:TOKEN' | base64
  3. Configure containerd
[plugins."io.containerd.grpc.v1.cri".registry.configs."registry.gitlab.com".auth]
  auth = "ENCODED_TOKEN"
@Overbryd
Overbryd / app.py
Last active December 1, 2023 09:40
# ... snip
def generate_upload_signed_url_v4(bucket_name, blob_name, *, origin=None):
storage_client = storage.Client()
bucket = storage_client.bucket(bucket_name)
blob = bucket.blob(blob_name)
headers = {}
if origin:
headers['origin'] = origin
return blob.generate_signed_url(
var botty = (function() {
'use strict';
var d = {
// Record client timestamp
ct: new Date().getTime(),
ctD: 0,
// Record obvious red flags
rf: (
window.callPhantom === undefined
@Overbryd
Overbryd / apply-patch.md
Last active October 7, 2020 12:27
The following describes the necessary steps to apply a git patch on a repository export

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 April 5, 2020 19:01 — 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.
##################
# 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
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 March 29, 2019 14:54
A pretty good unbound.conf, DNSSEC, caching and local forwarding
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 February 28, 2019 12:30
These are the best brownies of your life

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
<!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
> [email protected] 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)