Skip to content

Instantly share code, notes, and snippets.

@soardex
soardex / gist:062885a9aaa650dfc8d4
Created January 3, 2016 11:39
Repackage a CentOS 7 vagrant box
# update the box
sudo yum update -y
sudo yum clean all
# fill the empty spaces with zeroes
sudo dd if=/dev/zero of=/boot/EMPTY bs=1M
sudo rm -f /boot/EMPTY
sudo dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY
<?php
/**
* @author Matt Korostoff <mkorostoff@gmail.com>
*
* @copyright Licensed under the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version. http://www.gnu.org/licenses/
*
* @usage php path/to/this/file.php 'http://example.com'
*/
@GaryRogers
GaryRogers / createPhar.php
Last active March 28, 2020 23:54
Create a Phar archive for PHP
<?php
# Create an executable phar
# Name of our archive.
$phar = new Phar("myscript.phar");
# Have to do buffering to make things executable.
# See http://stackoverflow.com/questions/11082337/how-to-make-an-executable-phar
$phar->startBuffering();