Skip to content

Instantly share code, notes, and snippets.

elioair / joomlapagetitle.php
Last active Mar 21, 2016
get joomla page title
View joomlapagetitle.php
#Get Page Title#
$doc = JFactory::getDocument();
$page_title = $doc->getTitle();
#Set Page Title#
$con = JFactory::getConfig();
$sitename = $con->getValue('config.sitename'); $
doc->setTitle($page_title.' - '.$sitename);
elioair / gist:ec5ad8094ba30ae48347
Created Dec 31, 2015 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:ec5ad8094ba30ae48347
// API access key from Google API's Console
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
elioair / register.blade.php
Created Nov 1, 2015
Chesscaptcha and Laravel registration form view.
View register.blade.php
// Read the full tutorial on Chesscaptcha and Laravel here: //
// //
// The array that contains the configuration for the php side
$config = [
elioair / createapachesite
Last active Oct 4, 2015
Script to create a website in apache in a LAMP stack.
View createapachesite
# permissions
if [ "$(whoami)" != "root" ]; then
echo "Not enough privileges. Run this with sudo."
echo Please, enter website domain [of the form]
read NAME
elioair /
Last active Nov 20, 2021
Getting Joomla! module, template & plugin parameters.

==================================================== Getting Joomla! module, template & plugin parameters

Plugin parameters from inside a plugin

$param = $this->params->get('paramName', defaultValue);

Plugin parameters from outside a plugin

elioair / gulpfile.js
Created Jul 8, 2015
Auto-reload browser from gulp server on file edit.
View gulpfile.js
var gulp = require('gulp'),
livereload = require('gulp-livereload'),
less = require('gulp-less'),
connect = require('gulp-connect'),
minifyCSS = require('gulp-minify-css');
gulp.task('connect', function() {
root: 'files',
livereload: true,
elioair / steps_gulp_livereload_simple
Created Jul 7, 2015
Gulp Livereload auto reload browser.
View steps_gulp_livereload_simple
Reload the page on file change.
At first it took me a while to figure out how to setup the server from
the gruntfile to work with livereload and automatically reload the page in the browser.
Here are the steps that worked for me - it needs some fine tuning though.
Useful links: