Skip to content

Instantly share code, notes, and snippets.

Henry Snoek snoek09

View GitHub Profile
@snoek09
snoek09 / soapClientNonWsdl.php
Last active Apr 22, 2020
In case you need to connect to a soap service without WSDL
View soapClientNonWsdl.php
<?php
$client = new SoapClient(
null,
[
'location' => 'http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso',
'uri' => 'http://www.oorsprong.org/websamples.countryinfo',
]
);
@snoek09
snoek09 / xhprof_php7.md
Last active Jul 13, 2017
install XHProf fork (Tideways) on Ubuntu
View xhprof_php7.md

all instructions for php 7.0

install XHProf fork (Tideways) on ubuntu

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

deb http://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages debian main

$ wget -qO - https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/EEB5E8F4.gpg | sudo apt-key add -
$ sudo apt-get update
View gist:19e1dbdda1318b4a9570543b299450d7
git remote add upstream https://github.com/symfony/symfony-docs.git
nano .git/config
# in upstream block add
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
git fetch upstream
git merge upstream/pr/5285
@snoek09
snoek09 / get_line_content_from_file.sh
Last active Jan 7, 2016
Bash script to use a file with line numbers to get the content from those lines from another file
View get_line_content_from_file.sh
#!/bin/bash
# Usage get_line_content_from_file.sh 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
snoek09 / mailcatcher-setup-symfony-vagrant.md
Last active Jan 11, 2018
mailcatcher setup with symfony running in vagrant box
View mailcatcher-setup-symfony-vagrant.md

Forward port 1080 in Vagrantfile

config.vm.network :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
snoek09 / elasticsearch-head-marvel-setup-vagrant.md
Last active Aug 29, 2015
elasticsearch-head / marvel setup with elasticsearch running in vagrant box
View elasticsearch-head-marvel-setup-vagrant.md

Forward port 9200 in Vagrantfile

config.vm.network :forwarded_port, host: 9200, guest: 9200

elasticsearch-head

On vagrant box enable CORS

sudo nano /etc/elasticsearch/elasticsearch.yml
http.cors.enabled: true
@snoek09
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 https://github.com/symfony/symfony-docs.git

Edit .git/config

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

git fetch upstream

git merge upstream/pr/5285

@snoek09
snoek09 / soapClient.php
Last active Aug 29, 2015
SOAP Client test call, using Charles Proxy to debug
View soapClient.php
<?php
$options = array(
"cache_wsdl" => WSDL_CACHE_NONE,
"soap_version" => SOAP_1_1,
"trace" => 1,
"proxy_host" => "localhost",
"proxy_port" => 8888,
);
@snoek09
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
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK';
# config to enable HSTS(HTTP Strict Transport Security) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
@snoek09
snoek09 / teamcity.md
Last active Dec 21, 2015
TeamCity install
View teamcity.md

TeamCity

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.