Skip to content

Instantly share code, notes, and snippets.

Avatar

Rainer Schuster schuster-rainer

  • Consort-IT
  • Nuremberg
View GitHub Profile
@schuster-rainer
schuster-rainer / docker-dns
Created Oct 9, 2018
dns for resolving docker hostnames
View docker-dns
#!/bin/bash
# https://stackoverflow.com/questions/37242217/access-docker-container-from-host-using-containers-name
docker run --hostname dns.mageddo --name dns-proxy-server -p 5380:5380 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/resolv.conf:/etc/resolv.conf \
defreitas/dns-proxy-server
@schuster-rainer
schuster-rainer / Dockerfile
Created Sep 13, 2018
CentOS based rails docker setup
View Dockerfile
FROM drecom/centos-ruby:2.2.3
MAINTAINER Rainer Schuster <schuster-rainer@web.de>
ENV TZ Europe/Berlin
ENV LANG en_US.UTF-8
ENV APP_USER myapp
ENV APP_GROUP web
ENV HOME_DIR /home/${APP_USER}
@schuster-rainer
schuster-rainer / minimal_vst2x_host.cpp
Created Jul 25, 2018 — forked from t-mat/minimal_vst2x_host.cpp
WIN32 : Minimal VST 2.x host in C++11.
View minimal_vst2x_host.cpp
// Win32 : Minimal VST 2.x Synth host in C++11.
//
// This is a simplified version of the following project by hotwatermorning :
// A sample VST Host Application for C++ Advent Calendar 2013 5th day.
// https://github.com/hotwatermorning/VstHostDemo
//
// Usage :
// 1. Compile & Run this program.
// 2. Select your VST Synth DLL.
// 3. Press QWERTY, ZXCV, etc.
@schuster-rainer
schuster-rainer / libgit2.ipynb
Created Feb 13, 2018
using git as database from python
View libgit2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schuster-rainer
schuster-rainer / example.js
Created Aug 23, 2017
redux-form-immutable validator with JSON API
View example.js
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Field, reduxForm } from 'redux-form/immutable';
import muiThemeable from 'material-ui/styles/muiThemeable';
import './form';
import validatejs from 'validate.js';
const ExampleForm = ({onSubmit, ...props}) => (
<form onSubmit={onSubmit}>
@schuster-rainer
schuster-rainer / sample.py
Created Jan 28, 2016
Execute PIPED command in behave acceptance test
View sample.py
from behave import *
from os.path import join
from subprocess import Popen
import os
@when(u'the requirements are generated for documentation')
def step_impl(context):
cmd = " ".join(["my_fictional_command",
"input1",
context.requirements_filename,
@schuster-rainer
schuster-rainer / sample.feature
Last active Jan 28, 2016
Execute command from behave acceptance test
View sample.feature
Feature: Tracing
Scenario Outline: Generating a two column CSV
When I execute: my_fictional_command input1.xml input2.xml --header=COL1;COL2
Then the generated csv with <COL1> should map to <COL2>
Examples: COL1 maps to COL2
| REQ_ID| RELATED_ID |
| COL1| COL2 |
| A | 1 |
@schuster-rainer
schuster-rainer / jinja_magic.py
Created Nov 13, 2015
IPython jinja cell magic
View jinja_magic.py
from IPython import display
from IPython.core.magic import register_cell_magic, Magics, magics_class, cell_magic
import jinja2
@magics_class
class JinjaMagics(Magics):
'''Magics class containing the jinja2 magic and state'''
def __init__(self, shell):
View pythonnet-formatter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schuster-rainer
schuster-rainer / hello_debug_ipdb.clj
Created Oct 30, 2012
debuggin with ipdb in clojure-py
View hello_debug_ipdb.clj
(ns hello-debug)
(require '[ipdb :as pdb])
(pdb/set_trace)
(def greet "hello world!")
(println greet)
You can’t perform that action at this time.