Skip to content

Instantly share code, notes, and snippets.

View caseywilliams's full-sized avatar
🌷

Casey Williams caseywilliams

🌷
View GitHub Profile
@caseywilliams
caseywilliams / vanagon-bash-completions
Created October 6, 2017 20:10
Vanagon bash completion
# Bash completion for `bundle exec` or `be` in directories that look like vanagon packaging repos
_vanagon_actions()
{
if [[ -d ./configs/projects && -d ./configs/platforms ]]; then
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
projects=`ls ./configs/projects/*.rb 2>/dev/null | xargs -n 1 basename | rev | cut -c 4- | rev`
platforms=`ls ./configs/platforms/*.rb 2>/dev/null | xargs -n 1 basename | rev | cut -c 4- | rev`
@caseywilliams
caseywilliams / form_setup.txt
Last active June 21, 2023 13:01
Various TYPO3 formhandler snippets
# Autofilling formhandler field values from fe_user accounts
#####
plugin.Tx_Formhandler.settings.predef.formName {
...
# Autofill contact information
preProcessors {
1 {
class = Tx_Formhandler_PreProcessor_LoadDefaultValues
config {
@caseywilliams
caseywilliams / ext_tables.php
Last active March 27, 2017 08:38
Extending models and controllers in an extbase TYPO3 extension
<?php
// Table you're modifying
t3lib_div::loadTCA('tx_news_domain_model_news');
// TCA config, arbitrary example: simple text field - nice to include your ext's name in its name so you remember where it's from
$tempColumns = array (
'tx_myext_new_input' => array (
'exclude' => 0,
'label' => 'Some new input field',