Skip to content

Instantly share code, notes, and snippets.

Avatar
🙉

ando dre1080

🙉
View GitHub Profile
@dre1080
dre1080 / docker-cleanup-resources.md
Created Nov 9, 2020 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
@dre1080
dre1080 / config.yml
Last active Oct 20, 2020 — forked from Surendrajat/config.yml
fusuma multitouch gesture config for elementary OS
View config.yml
swipe:
3:
left:
command: 'xdotool key ctrl+super+Left'
right:
command: 'xdotool key ctrl+super+Right'
up:
command: 'xdotool key ctrl+t'
threshold: 1.5
down:
@dre1080
dre1080 / fix.md
Created Oct 19, 2020
megasync fix for deepin OS v20
View fix.md

you can fix this by adding the env variable in the launch file:

nano /usr/share/applications/megasync.desktop

and then replace Exec=megasync with Exec=env QT_SCALE_FACTOR=1 megasync

remove the TryExec line and save. you can then copy the megasync.desktop launch file to your autostart folder, e.g.:

@dre1080
dre1080 / .dotfiles
Last active Feb 25, 2021
my dotfiles
View .dotfiles
my dotfiles
@dre1080
dre1080 / Dockerfile
Created Oct 23, 2019
Nuxt.js Multi-Stage Dockerfile
View Dockerfile
# Build
FROM node:latest as build-env
ENV NODE_ENV production
WORKDIR /src
COPY . .
RUN yarn install \
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@dre1080
dre1080 / deploy.sh
Created Oct 29, 2018
Zero Downtime Docker Compose Deploys
View deploy.sh
#!/usr/bin/env bash
CONTAINER_NAME="$1"
PROJECT_NAME="app"
# lets find the first container
FIRST_NUM=`docker ps | awk '{print $NF}' | grep app_$CONTAINER_NAME | awk -F "_" '{print $NF}' | sort | head -1`
NUM_OF_CONTAINERS=1
MAX_NUM_OF_CONTAINERS=2
View gist:a3699bcb433f4d04d155955206a363e3
Series:
{n.space('.').colon('-').replaceAll(/[!?.]+$/).replaceAll(/&/, 'and').replaceAll(/[`´‘’ʻ']/).replaceAll(/\*/, '-').replaceTrailingBrackets('$1')}.{s00e00}.{t.space('.').colon('-').replaceAll(/[!?.]+$/).replaceAll(/&/, 'and').replaceAll(/[`´‘’ʻ']/).replaceAll(/\*/, '-').replaceTrailingBrackets('$1')}
Movies:
{n.colon(' - ')} ({y})
@dre1080
dre1080 / Contract Killer 3.md
Last active Oct 22, 2018 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post