Skip to content

Instantly share code, notes, and snippets.

View tolleiv's full-sized avatar

Tolleiv Nietsch tolleiv

  • Bare.ID Gmbh - an AOE Group company
  • Wiesbaden, Deutschland
View GitHub Profile
@tolleiv
tolleiv / README.md
Last active August 29, 2015 14:06
An example logstash setup
@tolleiv
tolleiv / statsd-zabbix.sh
Created September 29, 2014 09:12
Building a statsd backage with the Zabbix backend configured
https://github.com/etsy/statsd
https://github.com/parkerd/statsd-zabbix-backend
https://www.digitalocean.com/community/tutorials/how-to-configure-statsd-to-collect-arbitrary-stats-for-graphite-on-ubuntu-14-04
apt-get install python-software-properties
apt-add-repository ppa:chris-lea/node.js
apt-get update
apt-get install git nodejs npm devscripts debhelper
mkdir ~/build
cd ~/build
@tolleiv
tolleiv / test.sh
Created March 31, 2015 20:40
TTFB measurement - measuring connection, time to first byte and total connection time for a web request
#!/bin/bash
curl -s -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" $1
@tolleiv
tolleiv / .htaccess
Last active August 29, 2015 14:19
Cache Header Demo
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* /cms.php
@tolleiv
tolleiv / README.md
Last active August 29, 2015 14:25
Mnfst-Sneakpeak

.

@tolleiv
tolleiv / README.md
Last active August 29, 2015 14:28
NoIPAM Sneak peak
@tolleiv
tolleiv / README.md
Created August 23, 2015 21:12
Mnfst Puppet Helper Scripts

Scripts which use the Puppet dashboard data and update the mnfst-neo graph information.

Prereqisites are curl, awk, jq and csvtool to be available in the system.

Usage:

  • Make sure to set the DASHBOARD_HOST and MNFST_HOST environment variables
  • Trigger ./run.sh NO once every 10-30 minutes (depending on the assumed change rate)
  • Trigger ./run.sh YES once or twice a day to import new server / file information for each system and remove relations which are not relevant anymore.
@tolleiv
tolleiv / restore_backup.sh
Created April 14, 2012 20:35
T3o restore_backup
#!/bin/bash
# Get absolute path to main directory
ABSPATH=$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}")
SOURCE_DIR=`dirname "${ABSPATH}"`
#######################################################################
# Check for required binaries
if ! which mysql > /dev/null; then
@tolleiv
tolleiv / data.csv
Created June 24, 2012 17:57
http://kiwitobes.com/tree/decision_tree_example.txt turned into CSV to use with Google Predict
None slashdot USA 1 18
Premium google France 1 23
Basic digg USA 1 24
Basic kiwitobes France 1 23
Premium google UK 0 21
None (direct) New Zealand 0 12
Basic (direct) UK 0 21
Premium google USA 0 24
None slashdot France 1 19
None digg USA 0 18
@tolleiv
tolleiv / grad.rb
Created September 27, 2012 20:31
Tiny stochastic gradient descent demo
# origin: http://sifter.org/~simon/journal/20061211.html
# further resource to get the context: http://www.stat.osu.edu/~dmsl/Koren_2009.pdf
samples = [[1,1,5.0], [1,2,3.0], [1,3,2.5],
[2,1,2.0], [2,2,2.5], [2,3,5.0], [2,4,2.0],
[3,1,2.5], [3,4,4.0], [3,5,4.5], [3,7,5.0],
[4,1,5.0], [4,3,3.0], [4,4,4.5], [4,6,4.0],
[5,1,4.0], [5,1,3.0], [5,1,2.0], [5,4,4.0], [5,5,3.5], [5,6,4.0]]
# avoid overfitting