Skip to content

Instantly share code, notes, and snippets.

View Finkregh's full-sized avatar
🚲

Oluf Lorenzen Finkregh

🚲
View GitHub Profile
[solarized-dark]
background = #002b36
foreground = #839496
majorLine = #fdf6e3
minorLine = #eee8d5
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
@Finkregh
Finkregh / gist:5363493
Created April 11, 2013 13:45
running kibana behind nginx as reverse-proxy (replace '/kibana' with '', if you do not want to access kibana via /kibana)
location /kibana {
# rewrite before passing to proxy
rewrite /kibana/(.*) /$1 break;
proxy_pass http://127.0.0.1:5601;
# include nginx' proxy-defaults
include proxy_params;
# serve static stuff directly from the static-directory
location /kibana/favicon.ico {
alias /foo/Kibana-0.2.0/static/favicon.ico;
@Finkregh
Finkregh / elasticsearch
Last active December 16, 2015 02:39
elasticsearch debian-init-script this uses the system-user 'elasticsearch'!
# overwrite values set in the init-script
# put me into /etc/default/elasticsearch
input {
tcp {
type => "apt-history"
port => 3333
}
}
filter {
# First, glue all lines together into one event!
@Finkregh
Finkregh / gist:5418970
Created April 19, 2013 08:36
build RetroShare .deb on debian wheezy
# install build-dependencys:
apt-get install cmake debhelper libbz2-dev libcurl4-openssl-dev libglib2.0-dev libgnome-keyring-dev libgpgme11-dev libprotobuf-dev libqt4-dev libqt4-opengl-dev libspeex-dev libspeexdsp-dev libssl-dev libupnp6-dev libupnp-dev libx11-dev libxslt1-dev libxss-dev protobuf-compiler qt4-dev-tools qt4-qmake dpkg-dev
# download the latest RetroShare .tar.gz and unpack
tar xf RetroShare-xxxx.tar.gz
cd retroshare-xxxx/
# eeventually remove all VOIP stuff from
# src/plugins/Makefile src/Makefile debian/control
# when you get some errors compiling the voip-plugin
/* Reset
------------------------------------------------------------ */
body#ttrssMain,
body#ttrssPrefs,
body#ttrssLogin,
body {
color: #000;
font-family: "Arial", sans-serif;
font-size: 100%; /* Set to default browser size, 16px */
line-height: 1.5;
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
@Finkregh
Finkregh / gist:5744061
Last active December 18, 2015 07:09
build tvheadend on raspberypi (debian)
# see <https://tvheadend.org/projects/tvheadend/wiki/Building>
# sudo apt-get install build-essential git pkg-config libssl-dev bzip2 wget libavahi-client-dev zlib1g-dev
# get the sources, checkout release 3.1
git clone -b 3.1 git://github.com/andoma/tvheadend.git
cd tvheadend ; git co -b local-3.1
# create debian/changelog, set package-name
dch -v 3.1 --create
@Finkregh
Finkregh / userscript.js
Created June 17, 2013 11:25
Netscreen Compatability for Google Chrome / chromium
// ==UserScript==
// @name Netscreen Compatability for Google Chrome
// @author Tavis Ormandy
// @namespace https://lock.cmpxchg8b.com/
// @description Fix incompatible javascript conventions used in ScreenOS.
// @include http://*/dhtml.html*
// @include https://*/dhtml.html*
// @include http://*/code.html*
// @include https://*/code.html*
// ==/UserScript==
# Reverse the order of all intervals from /etc/rsnapshot.conf
#interval hourly 3
#interval daily 7
#interval weekly 4
##interval monthly 3
#
# all single commands below should be possible to be scripted within a bash loop
# by defining a function called interval and a process afterwards..
# to get all defined intervals from /etc/rsnapshot you can use grep