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 October 16, 2020 21:28
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 October 17, 2019 11:54
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 July 23, 2019 11:56
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 January 8, 2015 20:09
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 August 29, 2015 14:12
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 March 22, 2013 09:00
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 March 19, 2013 20:26
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;