Skip to content

Instantly share code, notes, and snippets.

openapi: "3.0.0"
info:
version: 1.0.0
title: OneOf example
paths:
/search:
post:
requestBody:
content:
application/json:
@david0
david0 / logstash-hl.py
Created September 22, 2022 14:21
Script for formatting logstash logs in a human readable manner
#!/usr/bin/env python3 -u
import json
import fileinput
class Terminal(object):
FG_RED = "\033[31m"
FG_YELLOW = "\033[33m"
BOLD = "\033[1m"
DIM = "\033[2m"
@david0
david0 / POC-deterministic-zip-checksums
Last active June 27, 2022 15:48
proof of concept for deterministic/reproduceable Zip file checksums
proof of concept to make Zip-file checksums more reliable
related to https://github.com/composer/composer/issues/2540
@david0
david0 / strip-autocomplete.user.js
Created March 3, 2014 15:26
Greasymonkey/Tampermonkey script that strips "autocomplete" attributes from username and password fields
// ==UserScript==
// @name Strip autocomplete attributes
// @namespace david0
// @version 0.1
// @description This plugin gives the control about your passwords back to your browser and allows the browser to store every password.
// @include http://*
// @include https://*
// @copyright 2014, David
// ==/UserScript==
@david0
david0 / com.apple.keyboardtype.plist
Last active January 21, 2021 07:43
Karabiner Neo2 Config without sticky M4
@david0
david0 / reaper-update.sh
Last active January 15, 2021 08:34
Reaper update script
#!/bin/sh
#RESPONSE=`curl -s https://www.landoleet.org/`
ping -c1 google.de || exit -1
NEWVERISON=6.`~/bin/reaper-download-url|grep -o '/reaper[^>]*_linux_x86_64.tar.xz'|tail -1|cut -c9-| cut -d_ -f1`
cd ~/aur/reaper
git reset --hard origin/master

Tested with: https://jsfiddle.net/xpvt214o/160079/

method   browser        key             which   keyCode charCode
----------------------------------------------------------------
keydown  Chrome         l               76      76      0   
keydown  Chrome         numpad enter    13      13      0   
keydown  Firefox        l               76      76      0
keydown  Firefox        numpad enter    13      13      0
keydown IE l 76 76 0 
@david0
david0 / LdifFilteringParser.py
Created September 22, 2017 06:23
LdifFilteringParser
#!/usr/bin/python3
from sys import argv, stdout
class LdifFilteringParser(object):
def __init__(self, input, output):
self.output = output
self.input = input
@david0
david0 / cindent.sh
Created July 21, 2017 07:41
my indent configuration
#!/bin/sh
gindent -nbad -bap -nbc -bbo -hnl -nprs-br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1 -l100 -ncdb -bli0 $*
@david0
david0 / agile-speed-date.html
Created May 9, 2017 06:26
Agile Speed Date Tool
<!DOCTYPE html>
<html>
<head>
<title>Agile Speeddating</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/vue@latest/dist/vue.js"></script>
<script type="text/javascript" src=" https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<style type="text/css">