Skip to content

Instantly share code, notes, and snippets.

View FibreFoX's full-sized 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 / raspi-huge-pages-kernel.md
Last active April 13, 2024 09:12
Compile Linux Kernel Raspberry Pi 5 with Huge Pages support

Out of the box the Linux Kernel from Raspberry Pi OS does not come with activated support for Huge Pages, but it can be activated while compiling your own Linux Kernel.

Instructions on how to compile the Linux Kernel for Raspberry Pi can be mostly found on this website:
https://www.raspberrypi.com/documentation/computers/linux_kernel.html

Huge Pages can improve the speed of crypto mining (like Monero) hashes by about 50% compared to the stock Kernel.

First install some reqirements for building and download the Kernel sources:

sudo su
@FibreFoX
FibreFoX / Dockerfile
Last active October 16, 2020 21:28
SonarQube 8.5.0 running on Raspberry Pi 4 (32bit Raspbian)
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)
<!-- 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
# -*- 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 / 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
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
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;
@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)
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)
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) {