Skip to content

Instantly share code, notes, and snippets.

View r10r's full-sized avatar

Ruben Jenster r10r

  • Drachenfels GmbH
  • Pforzheim
View GitHub Profile
@hermanbanken
hermanbanken / Dockerfile
Last active November 15, 2024 19:43
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@r10r
r10r / vimrc.local
Last active May 4, 2021 13:00
My vim config file
" location of this file
" global (debian): /etc/vim/vimrc.local
" user: ~/.vimrc
" Avoid that defaults overwrite custom configuration
" see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837761
" run ':scriptnames' to show the import order
let skip_defaults_vim=1
source $VIMRUNTIME/defaults.vim
@cryptix
cryptix / LICENSE
Last active June 26, 2024 01:30
example of using JWT for http authentication in go
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE S
@bg5sbk
bg5sbk / tcp_bench.go
Last active November 22, 2023 18:31
tcp benchmark for echo servers
package main
import (
"flag"
"fmt"
"log"
"net"
"sync"
"sync/atomic"
"time"
@atd-schubert
atd-schubert / starter.sh
Created April 9, 2013 12:53
Solution for starting ArgoUML in Mac OSX Mountain Lion
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Starting with Mountain Lion start helper"
$DIR/JavaApplicationStub &
@mvidner
mvidner / dbus-pulseaudio.rb
Created November 19, 2012 16:56
Pulse Audio socket path with ruby-dbus
#! /usr/bin/env ruby
require 'rubygems'
require 'dbus'
b = DBus.session_bus
ps = b.service 'org.PulseAudio1'
po = ps.object '/org/pulseaudio/server_lookup1'
po.introspect
pi = po['org.PulseAudio.ServerLookup1']
a = pi['Address']
path = a.split('=').last
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@stevenh512
stevenh512 / gitconfig-git
Created June 11, 2012 10:51
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "[email protected]:"]
pushInsteadOf = "git://github.com/"
[url "[email protected]:"]
pushInsteadOf = "https://github.com/"
@mikluko
mikluko / etc_monit_conf.d_local
Created May 21, 2012 11:12
Monit config to monitor and keep alive ppp connection
set mailserver localhost
set daemon 120 with start delay 240
set logfile syslog facility log_daemon
set httpd port 2812
allow localhost
set alert [email protected]
check host internet with address 80.254.111.254
if failed icmp type echo count 5 with timeout 30 seconds
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--