Skip to content

Instantly share code, notes, and snippets.

@michaeldyrynda
michaeldyrynda / gist:0967f384cb331f8c8f8a
Last active August 29, 2015 14:17
Simple command to add to your Homestead .bash_aliases file to create a new MySQL database
function newdb() {
if [[ "$1" ]]
then
mysql -uhomestead -p -e "CREATE DATABASE $1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci"
else
echo "Error: missing required parameter."
echo "Usage: "
echo " newdb dbname"
fi
}
@michaeldyrynda
michaeldyrynda / blog.md
Last active August 29, 2015 14:27
No, you really can't

Mirrored from the Oracle Blog, as the original post appears to have been removed.

By User701213-Oracle on Aug 10, 2015

I have been doing a lot of writing recently. Some of my writing has been with my sister, with whom I write murder mysteries using the nom-de-plume Maddi Davidson. Recently, we’ve been working on short stories, developing a lot of fun new ideas for dispatching people (literarily speaking, though I think about practical applications occasionally when someone tailgates me).

Writing mysteries is a lot more fun than the other type of writing I’ve been doing. Recently, I have seen a large-ish uptick in customers reverse engineering our code to attempt to find security vulnerabilities in it. This is why I’ve been writing a lot of letters to customers that start with “hi, howzit, aloha” but end with “please comply with your license agreement and stop reverse engineering our code, already.”

I can underst

@michaeldyrynda
michaeldyrynda / array_clean.php
Created October 26, 2015 23:15
Helper function to clean empty array values from a one-dimensional array input
<?php
/**
* Ensure that the input array has no empty-string values assigned.
*
* @param array $array
*
* @return array
*/
function array_clean(array $array)
@michaeldyrynda
michaeldyrynda / Envoy.blade.php
Created November 20, 2015 22:28
Clean old releases in Envoy
@task('clean_old_releases')
# This lists our releases by modification time and delete all but the 3 most recent.
purging=$(ls -dt {{ $release_dir }}/* | tail -n +3);
if [ "$purging" != "" ]; then
echo Purging old releases: $purging;
rm -rf $purging;
else
echo "No releases found for purging at this time";
fi

Keybase proof

I hereby claim:

  • I am michaeldyrynda on github.
  • I am michaeldyrynda (https://keybase.io/michaeldyrynda) on keybase.
  • I have a public key ASCSv4n5VGnpNDh0wt5Gx6P9LAbgdosHw1fuZ-YtwIoMKgo

To claim this, I am signing this object: