Skip to content

Instantly share code, notes, and snippets.

Henry Snoek snoek09

View GitHub Profile
snoek09 / soapClientNonWsdl.php
Last active Apr 22, 2020
In case you need to connect to a soap service without WSDL
View soapClientNonWsdl.php
$client = new SoapClient(
'location' => '',
'uri' => '',
snoek09 /
Last active Jul 13, 2017
install XHProf fork (Tideways) on Ubuntu

all instructions for php 7.0

install XHProf fork (Tideways) on ubuntu

$ sudo nano  /etc/apt/sources.list.d/tideways.list

deb debian main

$ wget -qO - | sudo apt-key add -
$ sudo apt-get update
View gist:19e1dbdda1318b4a9570543b299450d7
git remote add upstream
nano .git/config
# in upstream block add
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
git fetch upstream
git merge upstream/pr/5285
snoek09 /
Last active Jan 7, 2016
Bash script to use a file with line numbers to get the content from those lines from another file
# Usage file_containing_linenumbers_only file
while IFS='' read -r line || [[ -n "$line" ]]; do
awk '{ if(NR==n) print $0 }' n=$line $2
done < "$1"
snoek09 /
Last active Jan 11, 2018
mailcatcher setup with symfony running in vagrant box

Forward port 1080 in Vagrantfile :forwarded_port, host: 1080, guest: 1080

Install mailcatcher on vagrant box

sudo apt-get install ruby-dev
sudo apt-get install libsqlite3-dev
sudo gem install mailcatcher
snoek09 /
Last active Aug 29, 2015
elasticsearch-head / marvel setup with elasticsearch running in vagrant box

Forward port 9200 in Vagrantfile :forwarded_port, host: 9200, guest: 9200


On vagrant box enable CORS

sudo nano /etc/elasticsearch/elasticsearch.yml
http.cors.enabled: true
snoek09 / get_pull_request_from_deleted_fork.rst
Last active Aug 29, 2015
Get pull request from deleted fork
View get_pull_request_from_deleted_fork.rst

git remote add upstream

Edit .git/config

In upstream block add fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*

git fetch upstream

git merge upstream/pr/5285

snoek09 / soapClient.php
Last active Aug 29, 2015
SOAP Client test call, using Charles Proxy to debug
View soapClient.php
$options = array(
"cache_wsdl" => WSDL_CACHE_NONE,
"soap_version" => SOAP_1_1,
"trace" => 1,
"proxy_host" => "localhost",
"proxy_port" => 8888,
snoek09 / nginx.conf
Last active Aug 29, 2015
Extra SSL settings for Nginx
View nginx.conf
# enables server-side protection from BEAST attacks
ssl_prefer_server_ciphers on;
# disable SSLv3(enabled by default since nginx 0.8.19) since it's less secure then TLS
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ciphers chosen for forward secrecy and compatibility
# config to enable HSTS(HTTP Strict Transport Security)
snoek09 /
Last active Dec 21, 2015
TeamCity install


Java install

Ensure you have JRE or JDK installed and the JAVA_HOME environment variable is pointing to the Java installation directory. The Oracle Java 1.7 is recommended.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
You can’t perform that action at this time.