Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am 11mb on github.
* I am william_ (https://keybase.io/william_) on keybase.
* I have a public key whose fingerprint is 118E E34F D2E7 F8AD 55D7 9EC0 A20A 7C26 44DB E5F1
To claim this, I am signing this object:
@11mb
11mb / gist:b2d744e917ede1c8eef4
Created June 8, 2015 12:44
Get outgoing ip adres of server
<?php
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
@11mb
11mb / gist:44abc36321c9bd30f638
Last active August 29, 2015 14:22
jquery function skeleton (small)
(function ($) {
$.fn.functienaam = function (settings) {
settings = $.extend({}, settings);
return this.each(
function () {
// hier je code
}
<?php
define('TEST_KEY', 'are_we_glued');
$redis = new Redis();
try {
$redis->connect('localhost', 6379);
$redis->set(TEST_KEY, 'yes');
$glueStatus = $redis->get(TEST_KEY);
if ($glueStatus) {
$testKey = TEST_KEY;
echo "Glued with the Redis key value store:" . PHP_EOL;