Skip to content

Instantly share code, notes, and snippets.

View yauh's full-sized avatar

Stephan Hochhaus yauh

View GitHub Profile
@yauh
yauh / play-mongo.yml
Created July 9, 2014 12:18
Ansible install mongo cluster
---
- hosts: mongodb
sudo: True
remote_user: droid
roles:
- role: mongo_mongod
mongod_datadir_prefix: "/data"
mongod_replication: true
#!/bin/bash
#
# description: Script to start a meteor application through forever
# processname: forever/coffeescript/node
# pidfile: /var/run/forever-initd-meteor.pid
# logfile: /var/run/forever-initd-meteor.log
#
# Based on a script posted by
# https://github.com/hectorcorrea/hectorcorrea.com/blob/master/etc/forever-initd-hectorcorrea.sh
#
@yauh
yauh / acceptance.suite.yml
Created March 19, 2014 13:12
My working configuration for running codeception acceptance test with coverage and Yii 1 framework
# Codeception Test Suite Configuration
# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
@yauh
yauh / Vagrantfile
Created March 4, 2014 11:00
My vagrant setup for testing Yii apps with codeception
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# It's a wheezy box with 64bit 7.3 Debian
# full lamp stack, yii framework 1.1.14 and all required PHP/Pear modules for devs
@yauh
yauh / data-config.xml
Last active May 4, 2017 16:46
Making Solr import XML files
<dataConfig>
<dataSource name="fds" encoding="ISO-8859-1" type="FileDataSource"/>
<document>
<entity name="files"
dataSource="null"
rootEntity="false"
processor="FileListEntityProcessor"
baseDir="/tmp/provision/import"
fileName=".*\.xml"
---
# file: group_vars/all
bootstrap_user: stephan # change this to your user account that manages the server
use_sudo: True
admin_email: mail@example.org
---
# file: hardening.yml
- hosts: all
sudo: "{{ use_sudo }}"
@yauh
yauh / gist:8595566
Created January 24, 2014 11:15
pear installation via ansible
- name: PEAR installing modules
command: pear install {{ item }}
register: pear_result
with_items:
- pear.netpirates.net/phpDox
- pear.symfony.com/Yaml
- pear.phpmd.org/PHP_PMD
changed_when: pear_result.stdout.find("already installed") == -1
results in errors like this:
@yauh
yauh / gist:8044583
Last active December 31, 2015 21:09
Try to explain what the first sub of https://gist.github.com/asciidisco/cb094eadfb4c590e2701 does
sub HMLAN_Initialize($) { # sub takes only one argument
my ($hash) = @_; # takes all arguments provided during the sub routine call and shoves them into $hash
require "$attr{global}{modpath}/FHEM/DevIo.pm"; # gets another perl module involved (need to check this for function definitions as well)
# Provider
$hash->{ReadFn} = "HMLAN_Read"; # basically assigns values to the attributes provided to the sub routine call
$hash->{WriteFn} = "HMLAN_Write";
$hash->{ReadyFn} = "HMLAN_Ready";
$hash->{SetFn} = "HMLAN_Set";