Skip to content

Instantly share code, notes, and snippets.

@tored
tored / render-php-file.php
Last active August 29, 2015 14:22 — forked from james2doyle/render-php-file.php
Render a PHP file as a template
function renderPhpFile($filename, $vars = null) {
if (is_array($vars) && !empty($vars)) {
extract($vars);
}
ob_start();
include $filename;
return ob_get_clean();
}
// usage
@tored
tored / extension.js
Last active August 29, 2015 14:08 — forked from Ludaa/gist:be9c24e5c2b0b0b2ec6c
extension
function extension(filename) {
return filename.split(".").slice(1).pop() || "";
}
#!/bin/sh
##############################################################
# Modified bash install script originated from
#
# Rock-Solid Node.js Platform on Ubuntu (http://apptob.org/)
# Auto-config by apptob.org
# Author: Ruslan Khissamov, email: rrkhissamov@gmail.com
# GitHub: https://github.com/rushis
#
##############################################################