Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Wellner Bou paulwellnerbou

View GitHub Profile
View Extract git project
#!/bin/sh
mkdir $1
cd $1
git clone ~/src/fazcore
mv fazcore $1
cd $1
git filter-branch --subdirectory-filter $2 --prune-empty -- --all
git remote remove origin
git remote add origin ssh://git@git.tecfem.de/opt/git/repository/$1.git
@paulwellnerbou
paulwellnerbou / git-jira-changelog.sh
Last active Aug 29, 2015
Changelog with GIT and JIRA: Creating JIRA filter URL based on git commits between two revisions with bash
View git-jira-changelog.sh
#!/bin/bash
PROJECTKEYS="PROJ1|PROJ2"
JIRABASEURL="http://jira.example.com/"
# Put here your tag names, branches or just revision hashes
FROMREV="release-1.0"
TOREV="origin/master"
# Unfortunately I didn't manage to get the variable $PORJECTKEYS replaced within gawk's gensub()
View gist:2edc8951388cb0a54d65
FROM tomcat:7-jre7
MAINTAINER Paul Wellner Bou "<paul@wellnerbou.de>"
ENV SOLR_VERSION 4.7.2
# ADD http://central.maven.org/maven2/org/apache/solr/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}.war /usr/local/tomcat/webapps/solr.war
ADD solr-${SOLR_VERSION}/dist/solr-${SOLR_VERSION}.war /usr/local/tomcat/webapps/solr.war
ADD solr-home /opt/solr
ADD solr-${SOLR_VERSION}/dist/solrj-lib/slf4j-api* /usr/local/tomcat/lib/
@paulwellnerbou
paulwellnerbou / arch-en.adoc
Created Jul 12, 2015
Asciidoc template for Simon Brown's architecture documentation structure
View arch-en.adoc

Architectural documentation

Context

Functional Overview

Quality Attributes

Constraints

Principles

Software Architecture

External Interfaces

Code

@paulwellnerbou
paulwellnerbou / arch-de.asciidoc
Last active Oct 11, 2015
Deutsche Vorlage für Simon Browns Architekturdokumentationsvorschlag
View arch-de.asciidoc

Architekturdokumentation

Kontext

Fachlicher Kontext

Um was geht es, fachlich gesehen?

Aufgabenstellung

Was macht das System?

@paulwellnerbou
paulwellnerbou / disable-parse-in-vm.md
Last active Nov 4, 2015
This is Google's cache of http://www.repix.ch/blog/how-disable-include-parse-apache-velocity/. It is a snapshot of the page as it appeared on 10 Oct 2015 12:25:46 GMT.
View disable-parse-in-vm.md

How to disable #include / #parse in Velocity

by Sebastian Hoogenberk on April 9, 2015

For security reasons you might want to disable the #parse and the #include directives in Apache Velocity altogether, e.g. when users should be allowed to modify templates. The way to do this is via an event handler named IncludeEventHandler.

To disable #include and #parse, you first have to implement the IncludeEventHandler interface, and then you have to register your class in the Velocity configuration.

The class:

View system-setup.sh
apt-get install aptitude
# Remove recommended packages in aptitude
echo 'aptitude "";
aptitude::Keep-Unused-Pattern "";
aptitude::Delete-Unused-Pattern "";
APT "";
APT::Install-Recommends "false";' > ~/.aptitude/config
# Latest Docker
@paulwellnerbou
paulwellnerbou / click-touch-events.md
Last active May 13, 2016
Events fired on touch/click:
View click-touch-events.md

Safari (no touch):

mouseover
mousemove (2ms)
mousedown (421ms)
mouseup (157ms)
click (1ms)
mousemove
mouseout (15ms)
@paulwellnerbou
paulwellnerbou / decode-printable.sh
Last active Jul 2, 2016
Decode encoded email HTML with using php-cli
View decode-printable.sh
#!/bin/sh
encoded=$1
decoded="${1}.decoded.html"
php -r 'echo quoted_printable_decode(file_get_contents("'$encoded'"));' > $decoded
@paulwellnerbou
paulwellnerbou / embed-disqus-snippet.html
Last active Sep 23, 2017
Snippet to integrate Disqus in your Ghost blog without touching the templates of your theme
View embed-disqus-snippet.html
<!-- Put this snippet in your "Blog footer" via Ghost's "Code Injection" -->
<script>
// Your Disqus name
var disqusName = 'paulwellnerbou';
// The element where to append the Disqus discussion container, for Ghost 0.11 and the casper theme this is '.post-content'
var elementToAppendDisqusContainer = '.post-content';
var postContent = document.querySelector(elementToAppendDisqusContainer);
if(postContent !== null) {
var div = document.createElement('div');
div.setAttribute('id', 'disqus_thread');
You can’t perform that action at this time.