Skip to content

Instantly share code, notes, and snippets.

View tvlooy's full-sized avatar
🐧
<(o)

Tom Van Looy tvlooy

🐧
<(o)
View GitHub Profile
@tvlooy
tvlooy / veewee.md
Last active September 22, 2018 11:38
veewee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! boxen worden tegenwoordig via packer gemaakt !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Installeer ruby1.9.1-dev of je krijgt load errors bij gem install. Installeer libxslt1-dev libxml2-dev zlib1g-dev build-essential (dependencies van veewee)

@tvlooy
tvlooy / tcpdump-es-capture
Created June 26, 2017 11:29 — forked from z0mbix/tcpdump-es-capture
Capture Elasticsearch Queries
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
E...^.@.@............q#...}L...............
..#...#.GET /index/_search HTTP/1.1
Host: 127.0.0.1:9200
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded
@tvlooy
tvlooy / xdebug.ini
Created November 30, 2017 13:20
xdebug profiling tracing
zend_extension=/usr/lib/php5/20100525/xdebug.so
;xdebug.remote_enable=1
;xdebug.remote_autostart=1
;xdebug.remote_host=192.168.33.1
;xdebug.max_nesting_level=256
;xdebug.profiler_enable=1
;xdebug.profiler_output_dir=/tmp/xdebug
@tvlooy
tvlooy / ttfb.sh
Created September 27, 2017 13:14 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@tvlooy
tvlooy / retargeting_split.js
Created September 6, 2017 08:17
Retargeting Criteo Sociomantic split
<script type="text/javascript">
var getCookie = function(name) {
var match = document.cookie.match(new RegExp(name + '=([^;]+)'));
if (match) return match[1];
}
var ab_retarget = getCookie('ab_retarget_v1');
if (ab_retarget == undefined) {
if (Math.round(+new Date() / 1000) % 2) {
ab_retarget = 'sociomantic';
Java EE is dead. Stop using it
There is a lot of chatter on the internet about Java EE being dead. As someone who spent a lot of time implementing some of the core specs like CDI and also helping customers adopt JavaEE I was interested in determining if this is true.
Unfortunately the anecdotal evidence all points to JavaEE going the way of the DODO slowly. I am here to ring the bell. Please write all your future apps with Spring, LightBend etc., or even no framework.
This is the evidence now points towards JavaEE being dead:
1. Most of the prominent Java EE evangelists - Folks who in some cases are friends and I admire deeply have left their respective Java EE shepherd companies. Reza Rahman from Oracle, Kenny Bastani from Oracle and Arun Gupta from Redhat to name just a few ...
2. Oracle, Redhat and IBM - the three most prominent supporters of JavaEE are now spending their money and developers innovating elsewhere. Oracle cloud,OpenShift and Bluemix respectively.
@tvlooy
tvlooy / find_swap_users.sh
Created July 15, 2015 12:00
Find swap users
#!/bin/bash
TOTAL=0
for i in `find /proc -maxdepth 2 -type f -name status`; do
PID=`echo $i | cut -d/ -f3`
SWAP=$(grep VmSwap /proc/$PID/status 2>/dev/null | cut -d: -f2 | xargs | grep -v '^0 kB$')
if [ -n "$SWAP" ]; then
echo "$PID (`ps -p $PID -o comm=`) = $SWAP"
let TOTAL=$TOTAL+`echo $SWAP | cut -d' ' -f1`
fi
@tvlooy
tvlooy / pe.sh
Last active February 14, 2017 21:51
Select php engine
#!/bin/bash
# set this is your .bashrc ". ~/Tools/pe.sh 7.0"
# set this in your .bash_aliases "alias pe='. ~/Tools/pe.sh'"
VERSIONS=($(find /usr/local/ -maxdepth 1 -name 'php-*' | sort | cut -c16-))
VERSION=""
if [ -n "$1" ]; then
VERSION=$1
@tvlooy
tvlooy / build_nginx.sh
Last active January 24, 2017 04:31 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL & HTTP/2 patch
#!/bin/bash
set -e
# Names of latest versions of each package
export NGINX_VERSION=1.9.4
export VERSION_PCRE=pcre-8.37
export VERSION_LIBRESSL=libressl-2.2.3
export VERSION_NGINX=nginx-$NGINX_VERSION
@tvlooy
tvlooy / _phpunit.phar
Created January 26, 2013 20:55
phpunit zsh autocomplete support
#compdef phpunit.phar
_arguments -s -w \
'--list-groups[List available test groups]' \
'--tap[Report test execution progress in TAP format]' \
'--testdox[Report test execution progress in TestDox format]' \
'--colors[Use colors in output]' \
'--stderr[Write to STDERR instead of STDOUT]' \
'--stop-on-error[Stop execution upon first error]' \
'--stop-on-failure[Stop execution upon first error or failure]' \