Skip to content

Instantly share code, notes, and snippets.

View toin0u's full-sized avatar
🚀

Antoine Kirk toin0u

🚀
View GitHub Profile
Verifying that +toin0u is my blockchain ID. https://onename.com/toin0u
{
"dns" : [
{
"name" : "Google",
"ipv4" : [
"8.8.8.8",
"8.8.4.4"
]
},
{
{
"authenticationResultCode": "ValidCredentials",
"brandLogoUri": "http://dev.virtualearth.net/Branding/logo_powered_by.png",
"copyright": "Copyright © 2015 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
"resourceSets": [
{
"estimatedTotal": 1,
"resources": [
{
"__type": "Location:http://schemas.microsoft.com/search/local/ws/rest/v1",
@toin0u
toin0u / composer.json
Created February 22, 2015 22:22
DigitalOceanV2 with Guzzle 3.9
{
"require": {
"toin0u/digitalocean-v2": "0.5.*",
"guzzle/guzzle": "~3.9"
}
}
@toin0u
toin0u / composer.json
Created February 17, 2015 10:46
Flysystem ~1.0 + SFTP adapter
{
"require": {
"league/flysystem": "~1.0",
"league/flysystem-sftp": "~1.0"
}
}
@toin0u
toin0u / proof
Created September 17, 2014 21:34
Keybase.io proof
### Keybase proof
I hereby claim:
* I am toin0u on github.
* I am toin0u (https://keybase.io/toin0u) on keybase.
* I have a public key whose fingerprint is 5694 F6E4 B48B C1D8 C84F 48C8 7F8C 16C0 C9A0 A87B
To claim this, I am signing this object:
HTTP/1.1 200 OK
Date: Sat, 17 May 2014 21:45:16 GMT
Server: Apache/2.2.22 (Ubuntu)
Content-Location: search.php
Vary: negotiate,accept
@toin0u
toin0u / diff
Created May 15, 2014 21:54
Nominatim JSON & XML diff
http://nominatim.openstreetmap.org/search?q=Paris&format=xml&addressdetails=1&limit=5
``` xml
<?xml version="1.0" encoding="UTF-8" ?>
<searchresults timestamp='Thu, 29 Aug 13 15:07:41 +0000' attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright' querystring='Paris' polygon='false' exclude_place_ids='97923440,97357969,42637879,42729434,97962432' more_url='http://nominatim.openstreetmap.org/search?format=xml&amp;exclude_place_ids=97923440,97357969,42637879,42729434,97962432&amp;addressdetails=1&amp;q=Paris'>
<place place_id='97923440' osm_type='relation' osm_id='7444' place_rank='16' boundingbox="48.8155250549316,48.902156829834,2.22412180900574,2.46976041793823" lat='48.8565056' lon='2.3521334' display_name='Paris, Île-de-France, 75000, France métropolitaine, European Union' class='place' type='city' importance='0.96893459932191' icon='http://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png'>
<city>Paris</city><county>Paris</county><state>Île-de-Fr
<?php
interface ProviderInterface
{
public function foo();
}
abstract class AbstractProvider implements ProviderInterface
{
public function bar()
@toin0u
toin0u / Redis.php
Created May 13, 2013 11:04
When PhpRedis is set up with an Redis::OPT_PREFIX, It does set the prefix to the key and to the timeout value. To set the resolved key in an array seems fixing this issue. @see: https://github.com/nicolasff/phpredis/issues/158
<?php
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->setOption(Redis::OPT_PREFIX, 'foo:');
$redis->sAdd('queues', 'my-queue');
// output: "SADD" "foo:queues" "my-queue"
$redis->blpop('queue:my-queue', 5);