Skip to content

Instantly share code, notes, and snippets.

rlcamp / coroutine.c
Last active Mar 4, 2022
Coroutines for generator functions, sequential pipelines, state machines, and other uses in C
View coroutine.c
mohakshah /
Last active Dec 14, 2021
Building ZFS on Raspberry Pi 3 running Rasbpian


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.


  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
ppmathis /
Last active Jan 30, 2022
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
lorenzulrich / realurl_conf.php
Last active Jan 28, 2019
TYPO3 RealURL: Two sites in an installation, both with one domain per language
View realurl_conf.php
$realUrlSiteConfigurations = [
'site1' => [
'rootPageUid' => 1,
'schema' => 'https',
'languageDomainMap' => [
0 => '',
1 => '',
2 => '',
datenimperator /
Last active Sep 7, 2016
Temporary fix for Gitlab sockets not working inside a LXC container on Proxmox 4.1

This is a temporary fix for a problem running Gitlab on Proxmox 4.1 inside a LXC container. Symptom: UNIX sockets created inside containers get wrong permissions. This seems to be related to AppArmor and the Debian kernel used by Proxmox. See this thread on the Proxmox forum for details.

Run apt-get install inotify-tools if you haven't installed inotifywait yet.

Place the first file in /usr/local/sbin/ and make it executable: chmod 755 /usr/local/sbin/ Edit etc/rc.local to include it during boot.

arnekolja / PartialExistsViewHelper.php
Last active Oct 14, 2018
TYPO3 Fluid ViewHelper to check if a partial name exists ("My/Partial")
View PartialExistsViewHelper.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/{}/DetailCol1')}">
elvetemedve / Arch Linux, Fedora
Last active Dec 31, 2021
Allow Vagrant usage without providing sudo password
View Arch Linux, Fedora
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL
# Arch Linux, Fedora sudoers entries
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
sameersbn / gitlab.conf
Created Feb 6, 2015
Nginx reverse proxy configuration for GitLab
View gitlab.conf
upstream gitlab {
server fail_timeout=0;
# let gitlab deal with the redirection
server {
listen 80;
server_tokens off;
root /dev/null;
stefanvangastel / SoapClientCurl.php
Last active May 5, 2022
PHP 5.3 SoapClient with cURL request
View SoapClientCurl.php
* Class SoapClientCurl extends SoapClient __doRequest method with curl powered method
class SoapClientCurl extends SoapClient{
//Required variables
public $url = null;
public $certfile = null;
public $keyfile = null;
public $passphrase = null;
christopher-hopper /
Last active Apr 5, 2022
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: