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 / 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 / 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 / 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 / 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 / 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 / git.md
Last active June 25, 2023 13:47
Cheatsheet of git commands

Get status

git status

Add file to staging area

git add FILE
@marcobiedermann
marcobiedermann / google.md
Created February 11, 2018 19:19
Google Search Parameters

Search in URL

inurl:

Seach in Title

intitle:
@marcobiedermann
marcobiedermann / promise.js
Last active October 18, 2019 20:27
Promise Cheatsheet
// await must only be used if you want to execute something after promise to await the result
const createdUser = await createUser();
const user = await getUser();
// async must be used in function if you want to await something
(async () => {
await foo();
})()
// https://gist.github.com/rosszurowski/67f04465c424a9bc0dae
function lerpColor(a, b, amount) {
var ah = parseInt(a.replace(/#/g, ""), 16),
ar = ah >> 16,
ag = (ah >> 8) & 0xff,
ab = ah & 0xff,
bh = parseInt(b.replace(/#/g, ""), 16),
br = bh >> 16,
bg = (bh >> 8) & 0xff,
bb = bh & 0xff,
@marcobiedermann
marcobiedermann / docker.md
Created December 10, 2019 08:09
Clean up docker images, containers and volumes

Stop all Docker container

docker stop $(docker ps -aq)

Remove all Docker container

docker rm $(docker ps -aq)