Skip to content

Instantly share code, notes, and snippets.

Avatar
🙏
Meditating

Lars Nieuwenhuizen LarsNieuwenhuizen

🙏
Meditating
View GitHub Profile
@LarsNieuwenhuizen
LarsNieuwenhuizen / hosts
Created Apr 19, 2020
K3S installation setup with Ansible
View hosts
[cluster]
kubemaster ansible_host=192.168.2.40 ansible_user=pi
worker-1 ansible_host=192.168.2.41 ansible_user=pi
worker-2 ansible_host=192.168.2.42 ansible_user=pi
worker-3 ansible_host=192.168.2.43 ansible_user=pi
[cluster-masters]
kubemaster ansible_host=192.168.2.40 ansible_user=pi
[cluster-workers]
@LarsNieuwenhuizen
LarsNieuwenhuizen / select-double-key-combo.sql
Created Aug 20, 2018
Select double key combinations on table
View select-double-key-combo.sql
SELECT CP1.*
FROM table CP1
JOIN table CP2
ON CP1.item1_id = CP2.item1_id AND CP1.item2_id = CP2.item2_id AND CP1.id > CP2.id
@LarsNieuwenhuizen
LarsNieuwenhuizen / docker-compose.yml
Created Jan 3, 2018
Traefik & Docker basic example
View docker-compose.yml
version: '3.4'
services:
proxy:
image: traefik:1.4-alpine
command: --web --docker --docker.domain=docker.localhost
networks:
- traefik
ports:
- 80:80
View keybase.md

Keybase proof

I hereby claim:

  • I am larsnieuwenhuizen on github.
  • I am lnieuwenhuizen (https://keybase.io/lnieuwenhuizen) on keybase.
  • I have a public key ASDygemV8LMtmr1V80VJEtuf8r-kDG1wReP2p-MqfZ7qxgo

To claim this, I am signing this object:

@LarsNieuwenhuizen
LarsNieuwenhuizen / Settings.yaml
Last active Jun 14, 2016
Flow/Neos Custom ThrowingHandler with bugsnag reporting
View Settings.yaml
TYPO3:
TypoScript:
rendering:
exceptionHandler: 'Vendor\PackageKey\Error\ExceptionHandlers\ThrowingHandler'
Vendor:
PackageKey:
errors:
bugSnag:
apiKey: 'YourApiKeyHere'
@LarsNieuwenhuizen
LarsNieuwenhuizen / EncryptionService.php
Last active Aug 29, 2015
Simple service class to encrypt and decrypt string using php5-mcrypt
View EncryptionService.php
<?php
namespace Package\Key\Service;
use TYPO3\Flow\Annotations as Flow;
/**
* Class EncryptionService
*
* @Flow\Scope("singleton")
*/
@LarsNieuwenhuizen
LarsNieuwenhuizen / Test.php
Last active Jan 3, 2016
My TYPO3 Surf deployment for a TYPO3 website.Credits for \GrandSlam\Surf\Application\TYPO3\CMS go to Jesper Paardekooper: https://github.com/jp1987/GrandSlam.SurfHere all the functions are found for DB compare, symlinking folders like uploads, typo3temp and fileadmin and clearing the cache.Easy to create, easier to use :)
View Test.php
<?php
use \TYPO3\Surf\Domain\Model\Workflow;
use \TYPO3\Surf\Domain\Model\Node;
use \TYPO3\Surf\Domain\Model\SimpleWorkflow;
$application = new \GrandSlam\Surf\Application\TYPO3\CMS('My Website');
$application->setContext('Test');
$application->setDeploymentPath('/deployment');
$application->setOption('keepReleases', 4);
View ReplaceStringViewHelper.php
<?php
/**
* Replacement viewhelper
*
* @package lars_development
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
class Tx_ExtensionName_ViewHelpers_ReplaceStringViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
/**
* Replace the $searchFor string with $replaceString in $string