Skip to content

Instantly share code, notes, and snippets.

Dennis Micky Jensen mewm

Block or report user

Report or block mewm

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
View classsegment.base64
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXUAAAH0CAYAAADCEb21AABTRklEQVR4nO1965LkOHMdemJsS59kW37jffJp/9itFguV9wuQIPNEVJBEXgGSh+gkqvprjPE15Pi6fCKPsX2JXpQfr8zTZ2l+VJ+lW4uN1odHf96HjqMR4f+bOOb2uW2UTsRWKpv3ORmnz7XvaJPkqxkDi/0HfmMCANebkzqWENZ8nEV0qwgd6lOEb0ufpdsIcs/YzvvQcTSy/UP4VsSV6Gr8WUD5v8qwfUg2CPlVB9Lb1UbpSG0wfW1MkNilpK4h78EcZxOdZd+TC6WbMQbaNul2N5k/jdRfeN20UcSN+ZvbOV8SPQmZU6SGHb+QTdCWNi1xW48lMUFYZuoaMpMeS2VR+xF6kGzlGFBt3DZLN2I770PH0cj2/0I0cUfE1JL97BPT54h9TPIxPv1UIfJXm4eIoWNLTCzXH0hIfSYarg3T8ZKZlegsfiJkszyyn1HkG0nIEpLW6A2gPQvZ/i2oUHKZ40gfENBxl1s+j71EPvsZY/CkriFzC7lR9lIZtB/hx+qD0vX6PoHcI7bUfgai/XMz2VPq6dF1dOz4hSpEfm2zkr1lDLiYWNsbKFLXkjnUZj2WyrL3rblEjIkkJ0iHapNuV5E3tqX2M5DtH0N2PZ3bWvKx1tHHJB/jM0YVIn+1cceUjbYco4kxt13bxTN1iqS4NkyH0tcSXdQ+p2fxIRkTq+8haOO2q2w0W2o/C54YUTPl1bPyiDo6tT8mvyfM0ikdb7lFeqzJ/yM/jNQjyFxKbpx+JNFZ/Gj0IJmmj9acqD5Lt5HETJG0Vm9uz0K2/1NKLrN/bZynllvmY48910a1g6QO3UwWMofaosnMSnRR8bR2Wl8S39I+S7cRpB65HchxNLL9v7Ca3KXxvKWXoTgeRHulWbrHZlW55aNdM1PH2rVtlmMtiXL7Fp9W0sWOV/SZ20bpZG4HchyNDP9SgvT4mXUwctbW17H4XO
View commands.md

Php processes sorted by memory consumption

ps -ylC php-fpm --sort:rss

Average mem consumption

ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
@mewm
mewm / foo.bash
Last active Feb 8, 2018
Pi stuff
View foo.bash
cpufreq-info -s -m;
cat .ssh/id_rsa.pub | ssh pi@192.168.1.2 "cat >> ~/.ssh/authorized_keys"
@mewm
mewm / prepare-commit-msg.bash
Last active Aug 16, 2017
Git hook to extract ticket id by regex, to prefix the message with the ticket id when staging with a message.
View prepare-commit-msg.bash
#!/bin/sh
# Default regex for clubhouse.io tickets
DEFAULT_TICKET_REGEX="ch\d\+"
: ${TICKET_ID_REGEX:=$DEFAULT_TICKET_REGEX}
# Example
# Branch: ch1623/global-sitemap-urls-are-relative
# Message: Fixed that shit
# Result commit message: "ch1623: Fixed that shit"
@mewm
mewm / docker-logs-clean.sh
Created Aug 2, 2017
Docker clean log command
View docker-logs-clean.sh
#!/bin/bash
rm $(docker inspect $1 | grep -G '"LogPath": "*"' | sed -e 's/.*"LogPath": "//g' | sed -e 's/",//g');
#Invocation:
#$sudo ./docker-logs-clean.sh <container-name>;
@mewm
mewm / docker-compose.yml
Created Aug 1, 2017
docker-compose dev setup
View docker-compose.yml
version: '2'
services:
# Application source
app_source:
image: busybox
volumes:
- ./src:/var/www/site
- /var/log/php-fpm
# Web server/proxy
View post-receive.sh
#!/bin/sh
echo ' _____ _ _ _ ____ ____ '
echo '|_ _|_ _| |_| |_ ___ ___ __| | ___ | _ \ _____ __ _ \ ___ ___ '
echo ' | |/ _` | __| __/ _ \ / _ \ / _` |/ _ \ | | | |/ _ \ \ / / | | |/ _ \ / __|'
echo ' | | (_| | |_| |_ (_) | (_) | (_| | (_) | | |_| | __/\ V /| |_| | (_) | (__ '
echo ' |_|\__,_|\__|\__\___/ \___/ \__,_|\___/ |____/ \___| \_/ |____/ \___/ \___|'
echo "** Pushing to GitHub **"
git fetch
@mewm
mewm / .env.docker
Created Feb 22, 2017
Sane bootstrap project
View .env.docker
COMPOSE_PROJECT_NAME=que
APP_DOMAIN=que.dev:1337
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:bL0u0tMo8TFA8yIrBKAbMfONQ/uIZSqNcN4PlXniYTc=
DB_HOST=mariadb
DB_DATABASE=que
DB_USERNAME=que
DB_PASSWORD=que
View gist:781db402a071053e2eac0bd66eaed897
#B40909,#A10808,#a10808,#FFFFFF,#A10808,#ffffff,#ffffff,#FF8669
View gist:1eb7ca344ed052e8ee63a552c69cc4da
pcm.ch51dup {
slave.pcm surround51
slave.channels 6
type route
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
ttable.0.4 0.5
ttable.1.4 0.5
You can’t perform that action at this time.