Skip to content

Instantly share code, notes, and snippets.

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

Bob Maerten bobmaerten

🏠
Working from home
  • Level UP Solutions
  • Valenciennes, France
View GitHub Profile
@bobmaerten
bobmaerten / recette.md
Created January 26, 2023 07:33
Recette de pizza au four ménager

Protocole pour pate à pizza

Notes

  • la quantité de levure à utiliser dépend du temps de repos
  • pour les proportions, j'utilise l'app PizzApp+, le plus délicat est la gestion de l'hydratation, plus c'est hydraté, plus fondante est la pate, mais plus collanteelle est aussi pendant la préparation…
  • compter 230g par paton pour petites pizza individuelles, 300g pour les grandes.
  • plus longtemps la pate mature au frigo, plus légère/digest elle sera
  • plus la farine est "forte" (proportion de protéines), plus facile sera l'étalage

Préparation (à la main)

@bobmaerten
bobmaerten / .gitattributes
Last active August 3, 2024 03:02 — forked from jeromedalbert/.gitattributes
Automatically resolve Git merge conflicts in Rails schema.rb by picking the most recent date in the conflict (works with Rails 6 and recent versions of Git). The following files should be in your home ~ directory.
db/schema.rb merge=railsschema
@bobmaerten
bobmaerten / git-prune-tracked-branches
Created October 28, 2016 07:07
Merged tracked branches pruning to keep .git/config file clean
#!/usr/bin/env bash
current_branch=$(git rev-parse --abbrev-ref HEAD)
[ $current_branch == "master" ] || git checkout master
git fetch --all -p --tags
git pull
for BRANCH in $(git branch --merged origin/master | grep -v "\* master")
do
day-activity = "!f() { git log --all --committer=<Insert Name here> --pretty=tformat:'%<(80,trunc) %s %Cred%ci%Creset' --abbrev-commit --after='yesterday' | pbcopy; pbpaste; }; f"
@bobmaerten
bobmaerten / untitled
Created February 10, 2016 08:06
Docker create and serve default jekyll image
$ docker-machine use bobmaerten
$ docker create --name jekyll_site -v /srv/jekyll jekyll/jekyll
$ docker run --rm --label=jekyll --volumes-from jekyll_site -it -p 4000:4000 jekyll/jekyll jekyll new .
$ docker run --rm --label=jekyll --volumes-from jekyll_site -it -p 4000:4000 jekyll/jekyll
input {
file {
type => "apache"
path => [ "/data/*.log" ]
start_position => "beginning"
}
}
filter {
grok {
@bobmaerten
bobmaerten / keybase.md
Created June 3, 2015 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am bobmaerten on github.
  • I am bobmaerten (https://keybase.io/bobmaerten) on keybase.
  • I have a public key whose fingerprint is D422 3721 3686 DA7E C0E8 DD95 90C3 B7F1 8142 244D

To claim this, I am signing this object:

@bobmaerten
bobmaerten / run_php.sh
Created May 27, 2015 16:26
Run PHP CLI script with Docker
#!/usr/bin/env bash
die() { echo "$@" 1>&2 ; exit 1; }
[ "$#" -ne 1 ] && die "usage: $0 <php script>"
head -n 1 $1 | grep -q "^<?php" || die "error: only runs php scripts"
eval "$(docker-machine env dev)"
docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp php:5.6-cli php $1
@bobmaerten
bobmaerten / gist:c454ad03dbf81f72c220
Created September 30, 2014 07:34
Remember to update your docker images too!
❯ docker run --rm -i -t debian /bin/bash
root@bafbca8fc9af:/# env X='() { (a)=>\' bash -c "echo echo vuln"; [[ "$(cat echo)" == "vuln" ]] && echo "still vulnerable :("^C
root@bafbca8fc9af:/#
root@bafbca8fc9af:/#
root@bafbca8fc9af:/#
root@bafbca8fc9af:/# exit
❯ docker run --rm -i -t debian /bin/bash
root@feff7506db14:/# # test CVE-2014-6271
root@feff7506db14:/# env x='() { :;}; echo vulnerable' bash -c echo
@bobmaerten
bobmaerten / mysql-on-demand.sh
Last active August 29, 2015 14:06
Mysql On Demand
#!/usr/bin/env bash
usage() {
echo "Usage: `basename $0` {start|stop|status|connect}"
exit 1
}
if [ -z "$1" ]; then
usage
fi