Skip to content

Instantly share code, notes, and snippets.

Avatar
🕑
making changes to his life the next months

Danny Althoff FibreFoX

🕑
making changes to his life the next months
View GitHub Profile
@FibreFoX
FibreFoX / Dockerfile
Last active Oct 16, 2020
SonarQube 8.5.0 running on Raspberry Pi 4 (32bit Raspbian)
View Dockerfile
FROM openjdk:11-jre-slim-stretch
# Versions
ARG SONAR_VERSION=8.5.0.37579
ARG WRAPPER_VERSION=3.5.43
# Add needed software and create sonarqube user
RUN ["/bin/bash", "-c", "set -o pipefail && \
apt-get update && \
apt-get -y install openjdk-11-jre-headless unzip wget procps && \
@FibreFoX
FibreFoX / pom.xml
Created Oct 17, 2019
In-project Maven Repository (for private libs)
View pom.xml
<!-- create "private_libs" as folder and put your private maven-dependencies there -->
<repositories>
<!-- in project repository, mostly for private libs -->
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/private_libs</url>
<snapshots>
<enabled>true</enabled>
@FibreFoX
FibreFoX / Vagrantfile
Last active Jul 23, 2019
Debain Stretch VM with Vagrant on Windows 10 and Virtualbox
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.hostname = "some-vm"
## when using non-"contrib-" boxes from debian
## do NOT use rsync: https://stackoverflow.com/a/34882657/1961102
## override speficied type to use type "virtualbox" (default on debian-boxes are rsync)
@FibreFoX
FibreFoX / SomeJavaFXClassWithCDI.java
Created Jan 8, 2015
After some research if found a way to have a "slashscreen" within javafx 8 using native-bundle (and having CDI via OWB and Deltaspike)
View SomeJavaFXClassWithCDI.java
import java.util.logging.Logger;
import javafx.application.Platform;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javax.inject.Inject;
public class SomeJavaFXClassWithCDI extends javafx.application.Application {
@FibreFoX
FibreFoX / removeThumbsDB.js
Last active Aug 29, 2015
Remove thumbs.db (annoying windows-specific thumbnail-cache) from all subfolders with PhantomJS (1.9.8)
View removeThumbsDB.js
var fs = require('fs');
// --------------------------------------
// JS-fixes
if (!String.prototype.endsWith) {
console.log("fixing String-prototype (endsWith)");
Object.defineProperty(String.prototype, 'endsWith', {
enumerable: false,
configurable: false,
writable: false,
value: function (searchString, position) {
@FibreFoX
FibreFoX / jquery.isPartlyInViewPort.js
Created Mar 22, 2013
if you have jQuery and want to detect if something is partly shown, just use this here
View jquery.isPartlyInViewPort.js
function isPartlyInViewPort($entry){
var windowScrollTop = $(window).scrollTop();
var windowHeight = $(window).height();
var windowVisibleBottom = windowScrollTop + windowHeight;
var entryTop = $entry.offset().top;
var entryOuterHeight = $entry.outerHeight();
var entryVisibleBottom = entryTop + entryOuterHeight;
var isAboveViewPort = entryVisibleBottom < windowScrollTop;
var isBelowViewPort = windowVisibleBottom < entryTop;
@FibreFoX
FibreFoX / jquery.isTotallyInViewPort.js
Created Mar 19, 2013
if you have jQuery and want to detect if something is totally shown, just use this here
View jquery.isTotallyInViewPort.js
function isTotallyInViewPort($entry){
var windowScrollTop = $(window).scrollTop();
var windowHeight = $(window).height();
var windowVisibleBottom = windowScrollTop + windowHeight;
var entryTop = $entry.offset().top;
var entryOuterHeight = $entry.outerHeight();
var entryVisibleBottom = entryTop + entryOuterHeight;
var isInView = windowScrollTop < ( entryTop ) < (windowVisibleBottom);
if(!isInView) return false;