Skip to content

Instantly share code, notes, and snippets.

View pixelbrackets's full-sized avatar
🧑‍🎓
Looking at other things right now

Dan Kleine (geb. Dan Untenzu) pixelbrackets

🧑‍🎓
Looking at other things right now
View GitHub Profile
@pixelbrackets
pixelbrackets / image.md
Created February 11, 2018 13:42
Create/ write images of SD-cards

Create/ write images of SD-cards

Detect SD card

# show SD card - something like /dev/XXXX e.g  /dev/sdb1
df –h
# unmount the card to prevent card access while writing the image 
umount /dev/XXXX

Write image to SD card

@pixelbrackets
pixelbrackets / notes.md
Last active December 3, 2021 14:39
999+ New Messages - How to handle information overload
@pixelbrackets
pixelbrackets / templavoila.md
Created July 7, 2017 07:40
TemplaVoila Status Quo 2017/06

tl;dr “TemplaVoila!” (https://github.com/templavoila/templavoila/) is dead, Alexander Schnitzlers Fork “TemplaVoilà” is not working (https://github.com/alexanderschnitzler/templavoila/), Pluspols Fork “TemplaVoilà Plus” (https://github.com/pluspol-interactive/templavoilaplus/) is working but migrates all code due to the new extension key

Juni 2013: Tolleiv Nietsch stellt die Weiterentwicklung von TemplaVoila ein http://blog.tolleiv.de/2013/06/templavoila-future/

Mai 2014: TYPO3 Freelancer Alexander Schnitzler übernimmt zusammen mit Wouter Wolters die Weiterentwicklung von TemplaVoila

März 2015: Mehrere Bugfix Releases für TemplaVoila, kompatibel mit TYPO3 6.2

Mai 2015: Alexander Schnitzler kündigt an, dass es keine Feature Releases für TemplaVoila mehr geben wird, sondern nur noch ein paar letzte Bugfix Releases https://gist.github.com/alexanderschnitzler/7df8576d8abbcb8745b8

@pixelbrackets
pixelbrackets / quicklog.php
Last active August 30, 2021 11:59
Simple PHP log method
<?php
$data = ['foo' => 'Hello World'];
file_put_contents('/tmp/log.txt', time() . ' ' . print_r($data, true) . PHP_EOL, FILE_APPEND);
@pixelbrackets
pixelbrackets / api.php
Last active January 11, 2025 09:07
Simple PHP script to test and use cURL
<?php
/**
* Simple request response script
*
* Point you cURL request to this script to see all incoming data
*/
echo '*API*'. PHP_EOL;
@pixelbrackets
pixelbrackets / remove.sh
Created November 25, 2016 16:54
Remove ssh key form authorized_key files
cd /home/
### you may search for a part of the public key only, but make sure to not match unwanted keys of other users
grep -R -l 'SomeSSHKeyOrHostname' */.ssh/authorized_keys
sed -i '/SomeSSHKeyOrHostname/d' somedeploymentuser1/.ssh/authorized_keys
sed -i '/SomeSSHKeyOrHostname/d' somedeploymentuser2/.ssh/authorized_keys
sed -i '/SomeSSHKeyOrHostname/d' somedeploymentuser3/.ssh/authorized_keys
@pixelbrackets
pixelbrackets / usertsconfig.ts
Last active September 22, 2016 12:09
Blind menu items in TYPO3 Info module
/*
If you blind a menu item (e.g. let an editor edit translations, but dont show him tsconfig),
then check for all currently registered keys in the configuration module.
Open the configuration module in TYPO3 backend and select the option »BE Modules Extensions«.
This will show a tree. Just copy the key names and adjust the following snippet to your needs.
Warning: This will just blind the option, it is not an access check.
*/
@pixelbrackets
pixelbrackets / PageHasTranslationViewHelper.php
Created September 13, 2016 14:09
TYPO3 ViewHelper to check if a given page is translated into a given language or is translated at all
<?php
namespace Pixelbrackets\AcmeExtension\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Checks if a given page is translated into a given language or translated at all
*
* = Examples =
*
@pixelbrackets
pixelbrackets / DomainByLinkViewHelper.php
Created September 13, 2016 13:58
TYPO3 ViewHelper to return domain of a given link - usefull eg. for conditions with domain names (“if link points to »twitter.com«, then…”)
<?php
namespace Pixelbrackets\AcmeExtension\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Returns the domain of a given link
*
* = Examples =
*
@pixelbrackets
pixelbrackets / GroupedForViewHelper.php
Created October 28, 2015 13:57
Add the iteratition feature of the TYPO3 Fluid ForViewHelper to the GroupedForViewhelper
<?php
namespace Pixelbrackets\AcmeSitepackage\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Grouped loop viewhelper
*
* Iterates through elements and groups them by a specified property first
*