Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Bellone olivierbellone

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am olivierbellone on github.
  • I am olivierbellone (https://keybase.io/olivierbellone) on keybase.
  • I have a public key whose fingerprint is 71FE 51E3 B40B 3937 EDE2 CD19 DBEC 1477 4987 F432

To claim this, I am signing this object:

View stripe_curl_test.php
<?php
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://api.stripe.com/healthcheck");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$rbody = curl_exec($c);
if ($rbody === false) {
$errno = curl_errno($c);
$msg = curl_error($c);
curl_close($c);
View tls_test.php
<?php
function get_tls_version($sslversion = null)
{
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
if ($sslversion !== null) {
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion);
}
@olivierbellone
olivierbellone / tls_test.php
Created Jul 28, 2016
Simple TLS version test for PHP, using howsmyssl.com
View tls_test.php
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n";
@olivierbellone
olivierbellone / StripeSpark1OAuthApp.java
Created Nov 22, 2015
Stripe OAuth Example -- Java 7 + Spark 1
View StripeSpark1OAuthApp.java
package com.stripe;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import java.net.URI;
import static spark.Spark.get;
import spark.ModelAndView;
import spark.Request;
You can’t perform that action at this time.