Skip to content

Instantly share code, notes, and snippets.

@Norcoen
Norcoen / debian-stretch-fde.md
Created January 12, 2019 20:17 — forked from ppmathis/debian-stretch-fde.md
Guide which explains an installation of Debian Stretch with full disk encryption (including "/boot" partition, containing initramfs+kernel) by using Debian Jessie Live.

Debian Stretch - Full Disk Encryption

This documents guides you through the process to install Debian Stretch with Full Disk Encryption. The following requirements exist:

  • Mainboard with UEFI-Support
  • Debian Stretch Live CD booted from UEFI
  • Two unformatted, unpartitioned HDDs/SSDs for Software RAID1 with mdmadm

After following this guide, you will end up with a setup like this:

  • Redundant GRUB Standalone EFI installation on both disks
@Norcoen
Norcoen / SolrTYPO3.md
Created November 26, 2018 18:03 — forked from fedir/SolrTYPO3.md
TYPO3 Solr extension configuraiton sample

Constants

plugin.tx_solr {
	solr {
	scheme = http

	host = YY.YY.YY.YY
	port = 8080

path = /solr/core_XXXX/

@Norcoen
Norcoen / PartialExistsViewHelper.php
Created October 14, 2018 01:38 — forked from arnekolja/PartialExistsViewHelper.php
TYPO3 Fluid ViewHelper to check if a partial name exists ("My/Partial")
<?php
namespace Krbu\Utility\ViewHelpers;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
/**
* Copyright note: Some parts are copied from the Fluid package.
* Usage example:
* <f:if condition="{krbu:PartialExists(partial: 'Category/{item.category.id}/DetailCol1')}">
@Norcoen
Norcoen / Instructions.md
Created September 18, 2018 13:53 — forked from mohakshah/Instructions.md
Builing ZFS on Raspberry Pi 3 running Rasbpian

Introduction

This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@Norcoen
Norcoen / php-full-depth-case-insensitive-file-exists.php
Created July 27, 2018 00:39 — forked from jrsinclair/php-full-depth-case-insensitive-file-exists.php
PHP Full-depth Case Insensitive file_exists() Function
<?php
/**
* Single level, Case Insensitive File Exists.
*
* Only searches one level deep. Based on
* https://gist.github.com/hubgit/456028
*
* @param string $file The file path to search for.
*
* @return string The path if found, FALSE otherwise.
@Norcoen
Norcoen / flatArray.php
Created November 27, 2015 12:28
php function that Recursively converts nested array into a flat one with preserved keys connected with connector.
<?php
/**
* Recursively converts nested array into a flat one with keys preserving.
* @param array $result Resulting array
* @param array $array Source array
* @param string $prefix Key's prefix
* @param string $connector Levels connector
*/
function flatArray(array &$result, array $array, $prefix = null, $connector = '.') {
foreach ($array as $key => $value) {
@Norcoen
Norcoen / Documentation.md
Created June 20, 2016 09:39 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@Norcoen
Norcoen / code.md
Created May 2, 2016 13:49 — forked from weakish/code.md
The Six Most Common Species Of #Code #java #fun
@Norcoen
Norcoen / vm-resize-hard-disk.md
Created March 1, 2016 15:45 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@Norcoen
Norcoen / recursive_array_walk_recursive.php
Created February 26, 2016 15:11 — forked from seromenho/recursive_array_walk_recursive.php
array_walk_recursive working for objects.
<?php
class A
{
private $ab = 5;
public $ac = 6;
}
/**
* WARNING: This https://bugs.php.net/bug.php?id=45937 seems not yet solved