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 / .gitconfig
Last active March 7, 2019 10:45
Git Commit Message Template
### add this to your gitconfig (~/.config/git/config)
### …or use this command: git config --global commit.template ~/.config/git/gitcommitmessage.txt
[commit]
template = ~/.config/git/gitcommitmessage.txt
@pixelbrackets
pixelbrackets / .bash_aliases
Last active July 2, 2023 14:15
Bash Aliases
### path
alias sl='ls'
alias la='ls -alh'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
### git
alias gll='git log --graph --pretty=oneline --abbrev-commit'
alias gls='git log -7 --oneline'
@pixelbrackets
pixelbrackets / homepage.html
Last active August 29, 2015 14:13
Allow/Deny Content Elements in FLUX grids
<!-- Allow ONLY the FCE »Slider« in a column -->
<flux:grid>
<flux:grid.row>
<flux:grid.column name="sliderContent" colPos="1" variables="{allowedContentTypes: 'fluidcontent_content', Fluidcontent: {allowedContentTypes: 'Vendorname.some_extension_key:Slider.html'}}" />
</flux:grid.row>
<flux:grid.row>
<flux:grid.column name="mainContent" colPos="0" variables="{Fluidcontent: {deniedContentTypes: 'Vendorname.some_extension_key:Slider.html'}}" />
</flux:grid.row>
</flux:grid>
@pixelbrackets
pixelbrackets / Fluid.html
Last active May 15, 2019 17:24
TYPO3 Neos Backend Conditions
<f:if condition="{node.context.workspace.name} == 'live'">
Only visible in live frontend
</f:if>
<f:security.ifAccess privilegeTarget="TYPO3.Neos:Backend.GeneralAccess">
<f:if condition="{node.context.workspace.name} != 'live'">
Only visible in backend workspace
</f:if>
</f:security.ifAccess>
@pixelbrackets
pixelbrackets / bash
Last active November 13, 2022 03:46
wget crawler (e.g. simple cache warmup)
### crawls all links, writes the result to /tmp/ and deletes the files right away
wget --spider --force-html -r -l10 --directory-prefix=/tmp/ --no-directories --delete-after http://www.example.com
@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
*
@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 / 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 / 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 / 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