Skip to content

Instantly share code, notes, and snippets.

View 3isenHeiM's full-sized avatar
🏠
Working from home

3isenHeiM 3isenHeiM

🏠
Working from home
View GitHub Profile
@3isenHeiM
3isenHeiM / MDNS_jail_FreeNAS
Last active July 27, 2022 21:26
Enable MDNS on a FreeNAS/BSD jail. That will allow a Avahi name resolution of the jail in the local network.
freenas# jls
JID IP Address Hostname Path
...
5 - etherpad /mnt/basin/jails/etherpad
...
freenas# ./mdns.sh 5
Updating FreeBSD repository catalogue...
[etherpad] Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
[etherpad] Fetching packagesite.txz: 100% 6 MiB 5.9MB/s 00:01
@3isenHeiM
3isenHeiM / intel-opencl-neo-build.md
Last active December 19, 2019 11:29 — forked from Brainiarc7/intel-opencl-neo-build.md
Build Intel's Neo OpenCL platform on Ubuntu 19.10

Intel OpenCL stack enablement on Ubuntu 18.10.

Here's how to build and install Intel's new OpenCL enablement stack, Neo, which replaces the legacy Beignet ICD.

Install the dependencies:

Build dependencies:

sudo apt-get install ccache flex bison clang cmake g++ git patch zlib1g-dev autoconf xutils-dev libtool pkg-config libpciaccess-dev
@3isenHeiM
3isenHeiM / Fix_Nextcloud_DB.sql
Created January 7, 2020 09:27
This is the snippet I used ot fixe various errors in the MySQL structure of Nextcloud (running version 17)
# Convert to bigint
ALTER TABLE `oc_filecache` MODIFY `fileid` bigint NOT NULL AUTO_INCREMENT;
ALTER TABLE `oc_filecache` MODIFY `storage` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_filecache` MODIFY `parent` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_filecache` MODIFY `mimetype` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_filecache` MODIFY `mimepart` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_filecache` MODIFY `mtime` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_filecache` MODIFY `storage_mtime` bigint NOT NULL DEFAULT '0';
ALTER TABLE `oc_activity` MODIFY `activity_id` bigint NOT NULL AUTO_INCREMENT;
ALTER TABLE `oc_activity` MODIFY `object_id` bigint NOT NULL DEFAULT '0';
@3isenHeiM
3isenHeiM / .htaccess
Created January 7, 2020 09:34
This is the .htacess file content for Nextcloud (running v17). Sometimes during upgrades it's being over-written.
<IfModule mod_env.c>
# Add security and privacy related headers
Header always set Referrer-Policy "no-referrer"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Download-Options "noopen"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Permitted-Cross-Domain-Policies "none"
Header always set X-Robots-Tag "none"
Header always set X-XSS-Protection "1; mode=block"
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
@3isenHeiM
3isenHeiM / self-signed-certificate-with-custom-ca.md
Last active May 6, 2020 10:54 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. Keep it in a safe place!

openssl genrsa -out CA.key 4096

If you want a password-protected key, just add -des3 (or -aes256) option.

@3isenHeiM
3isenHeiM / crawl_yachtworld_pics.sh
Last active June 30, 2020 09:34
This script will download *high resolution* pictures from a YachtWorld article
#!/bin/bash
# Remove any old HTML file in the current folder
rm *.html
# Enter the yachtworld page :
read -p "Paste the YachtWorld page: " WEBPAGE
# Get the HTML code of the yachtworld page
wget -O yachtworld_page.html $WEBPAGE
@3isenHeiM
3isenHeiM / enable_monitor.sh
Last active December 9, 2020 10:02
Enable monitor mode on a wireless interface
#!/bin/bash
# Turn an interface in monitor mode (without airmon-ng).
# argument : wireless interface name
#
# Example :
# ./monitor.sh wlan1
IFACE=$1
if [[ $IFACE != wlan* ]]
@3isenHeiM
3isenHeiM / go-sharp-loader.go
Created August 5, 2020 21:42 — forked from ropnop/go-sharp-loader.go
Example Go file embedding multiple .NET executables
package main
/*
Example Go program with multiple .NET Binaries embedded
This requires packr (https://github.com/gobuffalo/packr) and the utility. Install with:
$ go get -u github.com/gobuffalo/packr/packr
Place all your EXEs are in a "binaries" folder
@3isenHeiM
3isenHeiM / go-sharp-loader.go
Created August 5, 2020 21:42 — forked from ropnop/go-sharp-loader.go
Example Go file embedding multiple .NET executables
package main
/*
Example Go program with multiple .NET Binaries embedded
This requires packr (https://github.com/gobuffalo/packr) and the utility. Install with:
$ go get -u github.com/gobuffalo/packr/packr
Place all your EXEs are in a "binaries" folder
@3isenHeiM
3isenHeiM / Install_FireflyIII_OVH.md
Last active December 9, 2020 10:03
Install Firefly III on OVH web hosting PRO

How to Install Firefly III on OVH web hosting (PRO only)

Requirements

  • OVH web hosting pro (for php CLI access via SSH)
  • MySQL database

Steps

1. Upgrade the PHP version

As of now (november 2020), OVH only proposes PHP 7.3. However, FireFly requires PHP 7.4.