Ruby on Rails vs. PHP in a Nutshell
How to Use Named Variables with Postgres and PHP PDO Driver
You can write reusable scripts with Postgres by taking advantage of named variables.
A named variable starts with a `:` in your sql script. Here is an example
You can then use this statement with `psql` and the `--variable` fl...
How to Decorate Imported Libs in Python for Jinja Template Filters in Flask
To decorate an imported function in Python you would do something like this
# in ./lib.py
# function body
And then in your program you could decorate it like this
from lib import function_name
function_name = decorat...
Chunk an FLV File into Multiple Parts
The format is as follows
ffmpeg -i <input file> -ss <starting point> -t <length of capture> <output file>
ffmpeg -i Input_File.flv -ss 00:00:00 -t 00:10:00 Output_Filename.flv
Programmatically Turn Off Comments in Wordpress with Filter
To turn comments off programmatically with a filter in Wordpress, you can set the post object's comment_status variable to "closed". Call the filter at some point after the post is loaded but before the comments are rendered. This is a hack, but I haven't...