Skip to content

Instantly share code, notes, and snippets.

View fabiang's full-sized avatar

Fabian Grutschus fabiang

  • Magdeburg, Germany
View GitHub Profile
@fabiang
fabiang / SSLPoke.java
Created January 9, 2020 13:30 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@fabiang
fabiang / BarTest.php
Last active February 23, 2018 17:20
Disable trigger_error() for only one test in PHPUnit
<?php
namespace MyNamespace;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_Error_Warning as WarningError;
class BarTest extends TestCase
{
private $object;
@fabiang
fabiang / README.md
Created February 12, 2016 09:52
Pass Github access token to virtual machines for Composer

Create a Github access token and set it globally with:

git config --global github.accesstoken your_access_token

You can also set a separate token for each project, if you don't pass --global to git config.

@fabiang
fabiang / BrowserContext.php
Created October 2, 2015 15:03
Mink + PhantomJS catch JavaScript Errors
<?php
use Behat\MinkExtension\Context\MinkContext;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
/**
* Defines application features from the specific context.