Skip to content

Instantly share code, notes, and snippets.

View redpop's full-sized avatar

Martin Alker redpop

  • punkt.de GmbH
  • Karlsruhe
  • 07:42 (UTC +02:00)
View GitHub Profile
# https://joostvanveen.com/run-composer-1-and-2-simultaniously
brew cleanup
brew link --overwrite composer
ln -s /usr/local/bin/composer /usr/local/bin/composer2
// Vanilla Throttle implementation
function throttle(func, wait = 100) {
let timer = null;
return function(...args) {
if (timer === null) {
timer = setTimeout(() => {
func.apply(this, args);
timer = null;
}, wait);
}
command_timeout = 1000
[character]
success_symbol = "[➜](bold green) "
error_symbol = "[✗](bold red) "
[nodejs]
format = "via [🤖 $version](bold green) "
let variables = Object.keys(window);
let sortedVariables = variables.sort((a, b) => {
if (a < b) return -1;
else if (a > b) return 1;
return 0;
});
console.log(sortedVariables);
alias php:7.4 'brew unlink php && brew link [email protected] --force --overwrite && php -v'
alias php:8 'brew unlink [email protected] && brew link php --force --overwrite && php -v'
let variables = Object.keys(window);
let sortedVariables = variables.sort((a, b) => {
if (a < b) return -1;
else if (a > b) return 1;
return 0;
});
console.log(sortedVariables);
@redpop
redpop / fluid_lib_math.html
Last active March 29, 2021 08:47
TypoScript Math Object in TypoScript #fluid #math #typoscript #format #number
<f:format.number decimals="0" thousandsSeparator="">
<f:cObject typoscriptObjectPath="lib.math" data="{value_1}*{value_2}" />
</f:format.number>
@redpop
redpop / lib_math.typoscript
Last active September 28, 2020 15:49
Math in TypoScript #typoscript #math
lib.math = TEXT
lib.math {
current = 1
prioriCalc = 1
}
@redpop
redpop / rsync_copy_only_pdfs_recursive_from_source_to_target_folder.sh
Created September 9, 2020 14:46
rsync copy only PDFs recursive from source to target folder
rsync -rv --include '*/' --include '*.pdf' --exclude '*' /path/to/source/ /path/to/target/
@redpop
redpop / rsync_remote_to_local.sh
Created September 9, 2020 14:44
rsync remote to local
rsync -a -P user@host:/tmp-remote/ /tmp-local/