Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# add docker repository
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
{
"success":true,
"data":
[
{
"name":"xhprof",
"description":"Description of xhprof addon",
"config": "https://gist.githubusercontent.com/Pegasuz/bd67f481e7071702e824fc8d70716038/raw/25f418169691ac64f1dd95b2bbf1603e8571c4f5/config.yml",
"postInstallMessage":"You should manually update your .env file: change 'DEVELOPMENT' to '1'."
},
@Pegasuz
Pegasuz / config.yml
Last active June 20, 2017 08:17
Example config definition
services:
xhguimongo:
image: mongo
xhguiapp:
image: dockerwest/php-xhgui:7.1
links:
- xhguimongo:mongo
xhguinginx:
@Pegasuz
Pegasuz / sort_array_multidim.php
Created December 15, 2016 13:33 — forked from tufanbarisyildirim/sort_array_multidim.php
sort a multidimensional array by sql like order by clause
<?php
/**
* @name Mutlidimensional Array Sorter.
* @author Tufan Barış YILDIRIM
* @link http://www.tufanbarisyildirim.com
* @github http://github.com/tufanbarisyildirim
*
* This function can be used for sorting a multidimensional array by sql like order by clause
*
* @param mixed $array
function debug($msg, $exit = true)
{
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') { // Only from my IP
echo "<pre>";
print_r($msg);
echo "</pre>";
$calledFrom = reset(debug_backtrace());
echo "<br>Called from " . $calledFrom['file'] . ' | line ' . $calledFrom['line'] . "<br>";
echo "<hr>";