Skip to content

Instantly share code, notes, and snippets.

View katzefudder's full-sized avatar
😼
I invented a timemachine next week

Florian Dehn katzefudder

😼
I invented a timemachine next week
View GitHub Profile
@katzefudder
katzefudder / Dockerfile
Created March 20, 2018 07:54
Get storage info from Artifactory
FROM golang:1.8
WORKDIR /go/src/app
COPY . .
RUN go-wrapper download && go-wrapper install
EXPOSE 9116
CMD ["go-wrapper", "run"] # ["app"]
@katzefudder
katzefudder / metering.py
Last active January 1, 2018 19:04
DHT11 + LDR on my RasPi
#!/usr/local/bin/python
import RPi.GPIO as GPIO
import time
import dht11
import graphitesend
#define the pin that goes to the circuit
pin_for_temp = 15
pin_for_light = 40
@katzefudder
katzefudder / Dockerfile
Created October 12, 2017 08:12
Ansible in a Container
FROM ubuntu:16.04
MAINTAINER Florian Dehn <[email protected]>
RUN echo "deb http://archive.ubuntu.com/ubuntu/ xenial multiverse" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python-pip openssh-client
RUN pip install --upgrade pip
@katzefudder
katzefudder / sh
Created September 10, 2017 08:30
send to graphite
#!/bin/bash
HOST=sub.host.domain
PORT=2003
echo "$1 $2 `date +%s`"|nc $HOST $PORT
@katzefudder
katzefudder / sh
Created September 10, 2017 08:29
send to statsd
#!/bin/bash
HOST=sub.host.domain
PORT=8125
METHOD=$1
KEY=$2
VALUE=$3
echo "$KEY:$VALUE|$METHOD"|nc -u -w 1 $HOST $PORT
@katzefudder
katzefudder / katzefudder.socat_launcher.plist
Created March 4, 2017 19:18
Docker API over HTTP via socat (OSX)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>katzefudder.socat_launcher</string>
<key>Disabled</key>
<false/>
<key>RunAtLoad</key>
<true/>
@katzefudder
katzefudder / send_graphite.sh
Created July 26, 2016 14:35
Send data to Graphite via netcat
#!/bin/bash
DATE=`date +%s`
HOST=graphite.host
PORT=2003
KEY=my.key
echo "${KEY} 1 ${DATE}" | nc -w 1 $HOST $PORT
[PIDinRootline = 6]
# implement a vertical timeline via TypoScript
# JS Demo: https://codyhouse.co/demo/vertical-timeline/index.html
# add JavaScript and Styles
page{
includeJS {
# {$screen.javascript} is just a constant for the javascript path
verticalSliderJs = {$screen.javascript}/vertical-timeline/js/main.js
}
@katzefudder
katzefudder / ConnectCommand.php
Created June 25, 2015 09:37
symfony command
#!/usr/bin/php
<?php
namespace DockerImages;
require_once __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@katzefudder
katzefudder / tt_content_category.ts
Last active August 29, 2015 14:05
Category wrapped in tt_content div
# wrap layout, language and tt_content uid around
tt_content.stdWrap.innerWrap.cObject.default.20.stdWrap.noTrimWrap = | class="| layout-{field:layout} language-{field:sys_language_uid} uid-{field:uid}"|
tt_content.stdWrap.innerWrap.cObject.default.20.stdWrap.insertData = 1
# wrap content category around
tt_content.stdWrap.innerWrap.cObject.default.20 = COA
tt_content.stdWrap.innerWrap.cObject.default.20 {
10 = CONTENT
10 {
wrap =|