Skip to content

Instantly share code, notes, and snippets.

Tom Van Looy tvlooy

Block or report user

Report or block tvlooy

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
@tvlooy
tvlooy / ttfb.sh
Created Sep 27, 2017 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
View ttfb.sh
#!/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 / tcpdump-es-capture
Created Jun 26, 2017 — forked from z0mbix/tcpdump-es-capture
Capture Elasticsearch Queries
View tcpdump-es-capture
# 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 / build_nginx.sh
Last active Jan 24, 2017 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL & HTTP/2 patch
View build_nginx.sh
#!/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
View InventoryItems.hs
module InventoryItems(Command(..), Event(..), handle) where
import Data.Maybe(isJust)
type Id = String
type Name = String
type Amount = Int
data Command = CreateInventoryItem Id
| RenameInventoryItem Id Name
View ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_, GK, stasilok
Version: 0.1.3
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.3 2013-03-30 show host and php version, can bookmark with hashtag ie. #statistics - needs new layout asap
0.1.2 2013-03-25 show optimization levels, number formatting, support for start_time in 7.0.2
@tvlooy
tvlooy / 01.php
Created Jun 23, 2011 — forked from smasty/01.php
10 PHP One Liners to Impress Your Friends
View 01.php
<?
foreach(range(1, 10) as $i) echo $i * 2 . " ";
You can’t perform that action at this time.