Skip to content

Instantly share code, notes, and snippets.

:octocat:
git push --force

Marco Biedermann marcobiedermann

:octocat:
git push --force
Block or report user

Report or block marcobiedermann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcobiedermann
marcobiedermann / docker.md
Created Dec 10, 2019
Clean up docker images, containers and volumes
View docker.md

Stop all Docker container

docker stop $(docker ps -aq)

Remove all Docker container

docker rm $(docker ps -aq)
View css-levels.js
// 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 / promise.js
Last active Oct 18, 2019
Promise Cheatsheet
View promise.js
// 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();
})()
@marcobiedermann
marcobiedermann / cloudSettings
Last active Feb 11, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-02-11T08:04:16.633Z","extensionVersion":"v3.4.3"}
@marcobiedermann
marcobiedermann / google.md
Created Feb 11, 2018
Google Search Parameters
View google.md

Search in URL

inurl:

Seach in Title

intitle:
@marcobiedermann
marcobiedermann / composer.md
Created Jan 28, 2018
Cheatsheet of composer commands
View composer.md

Initialize new composer.json

composer init

Install all dependencies specified in composer.json

composer install
@marcobiedermann
marcobiedermann / git.md
Last active Jan 10, 2018
Cheatsheet of git commands
View git.md

Get status

git status

Add file to staging area

git add FILE
@marcobiedermann
marcobiedermann / unix.md
Last active Jan 20, 2020
Unix tools and how to use them
View unix.md

Copy file content to clipboard

cat path/to/filename | pbcopy

Count words in file

cat path/to/filename | wc -w
@marcobiedermann
marcobiedermann / php-styleguide.md
Last active Mar 31, 2017
PHP Coding Styleguide
View php-styleguide.md

Do not use closing PHP tag at end of file

<?php

Capitalize class names.

class MyClassName
You can’t perform that action at this time.