Uploading Files with Curl
curl -i -F name=test -F filedata=@localfile.jpg http://example.org/upload
Courtesy of http://ariejan.net/2010/06/07/uploading-files-with-curl/
Written by Sean Behan on 06/17/2012
Recursively Search Contents of a File with Grep
The -r flag is for recursive, meaning it will also look in sub directories. The -i flag is for case insensitivity, meaning WORD and word will both be found.
grep -ir "search term" directory/path
Written by Sean Behan on 08/29/2013
How to send email with Python, smtplib and Postmark
Here is a quick code snippet showing how to send email via SMTP with Postmark without any dependencies. It assumes you are using Heroku and have added the addon. But if not just make sure your api keys are set as environment vars.
from os import envir...
Written by Sean Behan on 03/12/2017
Get Method Name as String in Python
Here is how to get the string representation of a method in Python
def my_method_name():
print "Hello World"
my_method_name.__name__
# => 'my_method_name'
Short and sweet!
Written by Sean Behan on 03/04/2017
How To Increase or Change the File Upload Size in the PHP ini file for Wordpress
You need to find which configuration ini file has been loaded by PHP. The easiest way to do this is to run the phpinfo() function from the command line.
php -r "phpinfo(); " | grep -i "loaded configuration file"
You should see something like...
Written by Sean Behan on 08/24/2013