Skip to content

Instantly share code, notes, and snippets.

View vdemeester's full-sized avatar
👷‍♂️
Working from home

Vincent Demeester vdemeester

👷‍♂️
Working from home
View GitHub Profile
@vdemeester
vdemeester / ssh_wrapper.sh
Created January 23, 2012 21:34
An ssh wrapper
#!/bin/sh
# ssh-wrapper
# The main job of this wrapper is to load ssh-keys if not loaded
SELF=$(basename $0)
warn() {
echo "$(tput setaf 1)>$(tput bold)>$(tput sgr0) $1"
}
command -v ssh >/dev/null || {
@vdemeester
vdemeester / git-filter-branch-goodies
Created December 17, 2012 10:43
One hell of a feature for git : Replace this to that in all xml and java file in the whole git history. It will rewrite history (but keeping commit date) so it is a bit dangerous ;-).
git filter-branch --tree-filter \
"find . -type f -iname '*.java' -o -iname '*.xml' \
-exec sed -i \
-e 's/this/that/g' {} \;"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.20 r96996"
GuestAdditionsFacility_VirtualBox Base Driver=50,1425672347846
GuestAdditionsFacility_Seamless Mode=0,1425672347846
GuestAdditionsFacility_Graphics Mode=0,1425672347846
DEBU[0044] STDERR:
DEBU[0044] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 33765 -i /home/vincent/.docker/machine/machines/node3/id_rsa docker@localhost ip addr show dev eth1
DEBU[0044] SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:71:a5:87 brd ff:ff:ff:ff:ff:ff
@vdemeester
vdemeester / publickey.gpg
Last active July 2, 2019 17:30
vincent@demeester.fr public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFGY5poBCADJRgzgbTUaS53tquvwg5Y8S1j0PyLKoIynlWKcZlSdmMCCoQCn
noHay6FBkNfWkDteRzZQiSikRyKGFRj7GywaZOVHMg6k2/m1D07hAUD2U/ghVD6B
OBRWRX6z6ZaZ7WRG/OSDEDoea6LYL2V7a9/L6qxjPQC3Kb63Q9Qq6ixHUVUSw4Uy
l78qQLrlYtn4o7CJ/OW/wj+VTI/CcoR7fgfxm6yN56wpqED61sBDiuJwdZGoeSrF
CmfDbD5Mc2q4xzXfpPMd1leZ6AMpwpqHNUYjMV20jV1B2sZrt0z2rBmUfN/cCKTe
GmtDOEG9t2Z73m8n9RC24ZJ+QmNThFrzUb/hABEBAAG0NVZpbmNlbnQgRGVtZWVz
dGVyICh2ZGVtZWVzdGVyKSA8dmluY2VudEBkZW1lZXN0ZXIuZnI+iQE6BBMBAgAk
AhsDAh4BAheABQsJCAcDBRUKCQgLBRYCAwEABQJXBMjoAhkBAAoJELfnzxxjQlb6
http://goo.gl/RhyZtl
[alias]
co = checkout
st = status
ci = commit
civ = commit -v
wdiff = diff --color-words
cim = !"command -v mvn >/dev/null && test -f ./pom.xml && mvn clean test && git commit"
br = branch
unstage = reset HEAD
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
% docker build -t art/aeriscloud.node.js - <<EOF 1 ↵
(heredoc) FROM busybox
(heredoc) VOLUME /var
(heredoc) EOF
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 0 : FROM busybox
---> 8c2e06607696
Step 1 : VOLUME /var
---> Running in 3e87e2baf268
FROM digitallyseamless/nodejs-bower-grunt:0.12
MAINTAINER Vincent Demeester <vincent.demeester@zenika.com>
COPY package.json /data/
RUN npm install
COPY . /data/
WORKDIR /data
ENTRYPOINT ["grunt"]
@vdemeester
vdemeester / test.go
Last active August 29, 2015 14:24
dockerCmd
dockerCmd(c, "Create container with ipc mode container should success with non running container",
"create", fmt.Sprintf("--ipc=container:%s", id), "busybox")
FROM golang
RUN ["go", "get", "github.com/geraldstanje/web_app/webserver" ]
WORKDIR /go/src/github.com/geraldstanje/web_app/webserver
# Add directories and files
ADD templates/index.html /go/src/github.com/geraldstanje/web_app/webserver/templates/index.html
ADD templates/musicalbums.html /go/src/github.com/geraldstanje/web_app/webserver/templates/musicalbums.html