Skip to content

Instantly share code, notes, and snippets.

View paulwellnerbou's full-sized avatar

Paul Wellner Bou paulwellnerbou

View GitHub Profile
#!/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 / import-once-workaround.scss
Last active January 17, 2019 18:38
Function for SASS/SCSS to avoid duplicate imports and redundant generated CSS. See http://paul.wellnerbou.de/2015/05/18/avoid-multiple-imports-of-the-same-scss-file-with-sass/ for more details.
/* If this function is imported, you can import scss files using:
@if not-imported("your-file") { @import "your-file"; }
*/
$imported-once-files: () !default;
@function not-imported($name) {
$imported-once-files: $imported-once-files !global;
$module_index: index($imported-once-files, $name);
@if (($module_index == null) or ($module_index == false)) {
@paulwellnerbou
paulwellnerbou / GitLogBetween.java
Created June 18, 2015 16:32
Getting git log between commits, branches and annotated tags with JGit
package de.wellnerbou.gitjira.jgit;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import java.io.IOException;
@paulwellnerbou
paulwellnerbou / git-jira-changelog.sh
Last active August 29, 2015 14:23
Changelog with GIT and JIRA: Creating JIRA filter URL based on git commits between two revisions with bash
#!/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()
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 July 12, 2015 18:26
Asciidoc template for Simon Brown's architecture documentation structure

Architectural documentation

Context

Functional Overview

Quality Attributes

Constraints

Principles

Software Architecture

External Interfaces

Code

@paulwellnerbou
paulwellnerbou / arch-de.asciidoc
Last active October 11, 2015 09:25
Deutsche Vorlage für Simon Browns Architekturdokumentationsvorschlag

Architekturdokumentation

Kontext

Fachlicher Kontext

Um was geht es, fachlich gesehen?

Aufgabenstellung

Was macht das System?

@paulwellnerbou
paulwellnerbou / disable-parse-in-vm.md
Last active November 4, 2015 13:23
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.

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:

@paulwellnerbou
paulwellnerbou / system-setup.sh
Last active January 8, 2016 14:33
System Setup
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 10:54
Events fired on touch/click:

Safari (no touch):

mouseover
mousemove (2ms)
mousedown (421ms)
mouseup (157ms)
click (1ms)
mousemove
mouseout (15ms)