Skip to content

Instantly share code, notes, and snippets.

<html style="background: #184b34">
<script>
window.color = {
red: 0,
green: 0,
blue: 0
};
window.color2 = [0, 0, 0];
window.steps = 0;
<?php
$winners = array(
array(
array(8, 17, 21, 31, 34),
array(9, 10),
),
array(
@slopjong
slopjong / PHPUnit.md
Last active October 3, 2019 12:00
Become DevOp Talk Series
        $mapperMock = $this->getMock('Doctor\Mapper\Calendar');
        $mapperMock
            ->expects($this->once())
            ->method('getDoctorTimeSlots')
            ->will($this->returnValue([]))
        ;

        $translator = $this->getMock('Zend\Translator');
        $translator

Docker

Create: Request

POST /v1.14/containers/create HTTP/1.1
Host: 127.0.0.1:9999
User-Agent: Docker-Client/1.2.0
@slopjong
slopjong / the_space_name.json
Created June 2, 2014 18:56
Example showing how to post a gist.
{
"api": "0.13",
"space": "The space name",
"logo": "http://your-space.com/logo.png",
"url": "http://example.com",
"location": {
"address": "see the documentation",
"lon": 5.973817,
"lat": 39.240431
},
@slopjong
slopjong / svg2png.sh
Created June 1, 2014 12:39
Converts a single SVG or a set of SVGs to PNG
#!/bin/bash
function convert()
{
file="$1"
# remove the svg file extension and append .png
destination="${file%.svg}.png"
# -z is for launching inkscape without the gui
<?php
$zoom = 0;
$n = pow(2, $zoom);
$lon = 6.07057;
$lat = 49.61629;
$xtile = floor((($lon + 180) / 360) * pow(2, $zoom)) + 0.5;
$ytile = floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) /2 * pow(2, $zoom)) + 0.5;
<?php
// with permutations of 'matrix' the encrypted text couldn't be decrypted
// there are more 6 char long names, see the following list:
// http://de.wikipedia.org/wiki/Matrix_%28Film%29#Synchronisation
// !! these are the German names !!
$initial_guess = "matrix";
function permutate($input) {
$guesses = array();
25/tcp filtered smtp
80/tcp open http
110/tcp open pop3
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
143/tcp open imap
443/tcp open https
445/tcp filtered microsoft-ds
465/tcp filtered smtps
593/tcp filtered http-rpc-epmap