Skip to content

Instantly share code, notes, and snippets.

View marcobiedermann's full-sized avatar
:octocat:
git push origin main -fu

Marco Biedermann marcobiedermann

:octocat:
git push origin main -fu
View GitHub Profile
@marcobiedermann
marcobiedermann / unix.md
Last active January 20, 2020 10:36
Unix tools and how to use them

Copy file content to clipboard

cat path/to/filename | pbcopy

Count words in file

cat path/to/filename | wc -w
@marcobiedermann
marcobiedermann / contao-setup.sh
Last active September 26, 2017 13:02
Contao 4 standard Installation Setup
#!/usr/bin/env bash
# Contao 4 standard releases: https://github.com/contao/standard-edition/releases/
# Contao Check releases: https://github.com/contao/check/releases
CONTAO_CORE_VERSION="4.4.5"
CONTAO_CHECK_VERSION="12.0"
# Install Contao
wget https://github.com/contao/standard-edition/releases/download/${CONTAO_CORE_VERSION}/contao-${CONTAO_CORE_VERSION}.tar.gz
tar -xzf contao-${CONTAO_CORE_VERSION}.tar.gz
@marcobiedermann
marcobiedermann / craftcms-setup.sh
Created September 9, 2016 18:49
Craft CMS Installation Setup
#!/usr/bin/env bash
# Install CraftCMS
curl -L -o latest.zip https://craftcms.com/latest.zip?accept_license=yes
unzip latest.zip
rm -f latest.zip
@marcobiedermann
marcobiedermann / jquery.scroll-to.js
Created June 16, 2016 16:51
jQuery ScrollTo Function
(function($) {
$('.scroll-to').on('click', function(event) {
event.preventDefault();
$('html, body').animate({
scrollTop: $($.attr(this, 'href')).offset().top
}, 800);
return false;
@marcobiedermann
marcobiedermann / drupal-setup.sh
Last active November 3, 2017 12:55
Drupal Installation Setup
#!/usr/bin/env bash
DRUPAL_VERSION="8.4.1"
# Install Drupal
wget http://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz
tar -xzf drupal-${DRUPAL_VERSION}.tar.gz
rm -f drupal-${DRUPAL_VERSION}.tar.gz
cd drupal-${DRUPAL_VERSION}
cp -rf . ..
@marcobiedermann
marcobiedermann / typo3-setup.sh
Last active December 22, 2017 19:00
Typo3 Installation Setup
#!/usr/bin/env bash
TYPO3_VERSION="8.7.9"
# Download and extract Typo3
curl -L -o typo3_src.tgz get.typo3.org/${TYPO3_VERSION}
tar -xzf typo3_src.tgz
rm -f typo3_src.tgz
# Symlink Typo3 source folder
@marcobiedermann
marcobiedermann / wordpress-setup.sh
Last active June 3, 2016 08:37
WordPress Installation Setup
#!/usr/bin/env bash
# Download and extract WordPress
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
rm -f latest.tar.gz
mv wordpress/* .
rm -rf wordpress
# Remove setup file
@marcobiedermann
marcobiedermann / contao-setup.sh
Last active January 4, 2020 10:50
Contao Core Installation Setup
#!/usr/bin/env bash
# Contao Core releases: https://github.com/contao/core/releases
# Contao Check releases: https://github.com/contao/check/releases
CONTAO_CORE_VERSION="3.5.40"
CONTAO_CHECK_VERSION="12.2"
# Install Contao
wget https://github.com/contao/core/releases/download/${CONTAO_CORE_VERSION}/contao-${CONTAO_CORE_VERSION}.tar.gz
tar -xzf contao-${CONTAO_CORE_VERSION}.tar.gz
@marcobiedermann
marcobiedermann / backup.sh
Last active March 16, 2017 20:14
Backup Database
#!/usr/bin/env bash
# settings
BACKUP_DIRECTORY="backups"
SITE=""
DB_HOST=""
DB_NAME=""
DB_USER=""
DB_PASS=""
@marcobiedermann
marcobiedermann / snippets.md
Last active May 25, 2022 19:57
Mac OS Command Line Snippets

Compression

Archive tar and gzip

tar -czf output.tar.gz input_folder1 input_folder2 input_file …

Extract tar and gzip