Skip to content

Instantly share code, notes, and snippets.

View andi1984's full-sized avatar
🏠
Working from home

Andreas Sander andi1984

🏠
Working from home
View GitHub Profile
@andi1984
andi1984 / nav.json
Last active February 22, 2023 21:36
test nav.json
{
"private": {
"links": [
{ "label": "Twitter", "url": "http://www.twitter.com" },
{ "label": "LinkedIn", "url": "https://www.linkedin.com/"},
{ "label": "Matrix", "url": "https://app.element.io/"},
{ "label": "Geizhals", "url": "https://geizhals.de/"},
{ "label": "MyDealz", "url": "https://www.mydealz.de/"},
{ "label": "Wetter", "url": "https://kachelmannwetter.com/de/wetter/2862923-niedersalbach"},
{ "label": "Raindrop", "url": "https://app.raindrop.io/"}
@andi1984
andi1984 / demo.js
Last active November 27, 2020 10:34
/**
* @typedef {import("./typings").Car} Car
*/
/**
* @type {Car}
*/
const porsche993 = {};
@andi1984
andi1984 / docker
Last active September 30, 2020 17:48
#!/bin/bash# Delete all containersdocker
rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)# Prune unused volumesdocker volume prune
# https://unix.stackexchange.com/a/38380
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4
@andi1984
andi1984 / lint.css
Last active July 7, 2020 12:48
Lint HTML CSS #lintHTMLwithCSS
/* forbidden nesting */
:not(figure) > figcaption,
:not(fieldset) > legend,
:not(dl) > :is(dt, dd),
:not(tr) > :is(td, th),
:not(select) > :is(option, optgroup),
:not(table) > :is(thead, tfoot, tbody, tr, colgroup, caption) {
outline: 2px dotted red;
}
@andi1984
andi1984 / cloudSettings
Last active May 26, 2020 13:04
Visual Studio Code Sync Settings GIST
{"lastUpload":"2020-05-26T13:04:14.478Z","extensionVersion":"v3.4.3"}
@andi1984
andi1984 / lambda.py
Created May 7, 2020 08:43
Lambda - Bitbucket, change PR description
import json
from botocore.vendored import requests
import os
def lambda_handler(event, context):
payload = json.loads(event['body'], encoding='utf8')
title = payload["pullrequest"]["title"]
description = payload['pullrequest']['description']
with open('checklist.txt') as f:
extra_text = f.read()
@andi1984
andi1984 / 1-easy.js
Created January 6, 2020 19:04 — forked from nybblr/1-easy.js
3 examples of using Async Generators and Async Iteration in JavaScript!
// Create a Promise that resolves after ms time
var timer = function(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
};
// Repeatedly generate a number starting
// from 0 after a random amount of time
var source = async function*() {
@andi1984
andi1984 / netlify.toml
Created June 13, 2019 17:52
Example netlify config
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
base = "project/"
# Directory (relative to root of your repo) that contains the deploy-ready
# HTML files and assets generated by the build. If a base directory has
# been specified, include it in the publish directory path.
@andi1984
andi1984 / docker.sh
Last active May 16, 2019 07:00
Docker - Remove
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# Prune unused volumes
docker volume prune
# Log in with bash to container
docker exec -i -t <container-id> /bin/bash