Skip to content

Instantly share code, notes, and snippets.

View joekolade's full-sized avatar

Joe Kolade joekolade

View GitHub Profile
@joekolade
joekolade / page.typoscript
Created March 14, 2023 14:44
[PageTS] Basic pageTS #refactor
TCEMAIN.table.pages {
disablePrependAtCopy = 1
disableHideAtCopy = 0
}
TCEMAIN.table.altL {
disablePrependAtCopy = 1
bodytext.RTEfullScreenWidth= 100%
}
#Setzen der Seitenbaumrechte per TypoScript
TCEMAIN {
@joekolade
joekolade / page.typoscript
Created March 14, 2023 14:45
[BodyTag] Manipulate body tag in typoscript
page {
bodyTagCObject = CASE
bodyTagCObject {
key.field = layout
default = TEXT
default.value = <body id="id_{field:alias//field:uid}" class="{$languageKey}">
default.insertData = 1
0 < .default
1 = TEXT
1.noTrimWrap = |<body id="id_{field:alias//field:uid}" class="{$languageKey} |">|
@joekolade
joekolade / clone.sh
Created March 14, 2023 14:46
[Clone TYPO3 instance] #refactor
#!/bin/bash
# typo3 should be in a subfolder e.g. "domain.tld/liveweb"
# in that subfolder there must be a folder named "_backup_DBs"
#
# vars
#
now=$(date +"%Y%m%d")
@joekolade
joekolade / cookie.js
Created March 14, 2023 14:47
[JS cookie] Cookie handler
@joekolade
joekolade / select.scss
Created March 14, 2023 14:48
[Selectbox CSS]
// @see https://www.macrone.de/das-html-select-element-pure-css-styling/
$base-padding: 8px;
select {
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
&::-ms-expand {
@joekolade
joekolade / curl.php
Created March 14, 2023 14:48
[curl call] PHP curl call
/**
* Basic Curl-Call
* @see http://codular.com/curl-with-php
*/
$url = '###URL###';
$token = '122321231';
// Get cURL resource
$curl = curl_init();
@joekolade
joekolade / user.typoscript
Created March 14, 2023 14:49
[User TS] Basic user ts #refactor
# Pagetree http://wiki.typo3.org/Pagetree
options.pageTree.backgroundColor.1 = rgba(0, 0, 0, 0.1)
#options.pageTree.showPathAboveMounts = 1
options.pageTree.showPageIdWithTitle = 0
options.pageTree.showDomainNameWithTitle = 1
options.pageTree.showNavTitle = 1
#options.pageTree.hideFilter = 1
#options.contextMenu.table.pages.disableItems = info,history,mountAsTreeroot,expandBranch,collapseBranch
# cache control
@joekolade
joekolade / upgrade.sh
Created March 14, 2023 14:50
[Mac upgrade software]
# Mac Software Pflege
# update components
upgrade_oh_my_zsh
brew update
composer selfupdate
brew upgrade node
npm install -g npm
nvm install node —latest-npm
nvm install 10 —latest-npm
@joekolade
joekolade / cleanup_typo3.sh
Created March 14, 2023 14:52
[TYPO3 lowlevel cleanup] #refactor
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_refindex -e
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_cleaner orphan_records -r ###--dryrun|--AUTOFIX###
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_cleaner versions -r ###--dryrun|--AUTOFIX###
# Run multiple times
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_cleaner tx_templavoila_unusedce -r ###--dryrun|--AUTOFIX###
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_cleaner double_files -r ###--dryrun|--AUTOFIX###
###php_cli### ./typo3/cli_dispatch.phpsh lowlevel_cleaner deleted -r ###--dryrun|--AUTOFIX###
@joekolade
joekolade / sticky.js
Created April 8, 2023 14:11
[Sticky element JS]
var sticky = function(elementSelector, heightSelector){
var h = document.querySelector(elementSelector);
var stuck = false;
var stickPoint = getDistance(heightSelector);
function getDistance(heightSelector) {
var topDist = h.offsetTop || document.querySelector(heightSelector).offsetHeight;
return topDist;
}