Skip to content

Instantly share code, notes, and snippets.

View gunjanpatel's full-sized avatar

Gunjan Patel gunjanpatel

View GitHub Profile
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup
@gunjanpatel
gunjanpatel / user.md
Created April 22, 2015 07:24
trigger joomla user plugin from your component

Using following code you can trigger any joomla user plugin event in your component

JPluginHelper::importPlugin('user', 'contactcreator');

JDispatcher::getInstance()->trigger(
	'onUserAfterSave', 
	array(
 $user, 
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@gunjanpatel
gunjanpatel / phpdoc.md
Created February 6, 2015 06:44
phpdoc generator or creator command

phpdoc -d "." -t "/var/www/html/redshopdoc/responsive-twig" --template="responsive-twig"

@gunjanpatel
gunjanpatel / elasticbeanstalk.md
Last active August 29, 2015 14:12
amazon elastic beanstalk update environment

Amazon Elastic Beanstalk update file using git

  1. Create folder named as .elasticbeanstalk and create files named config and aws_credentials in the same folder.

    1. config
    [global]
    

ApplicationName=

@gunjanpatel
gunjanpatel / gist:b083dff8a0f49f9a02d5
Created October 19, 2014 05:52
postgresql installation on ubuntu
http://www.ubuntugeek.com/howto-setup-database-server-with-postgresql-and-pgadmin3.html
@gunjanpatel
gunjanpatel / getshoppergroup.php
Last active August 29, 2015 14:06
get redshop shopper group from joomla user id
<?php
require_once JPATH_SITE . '/components/com_redshop/helpers/user.php';
$rsUserhelper = new rsUserhelper;
$shopperGroupId = (int) $rsUserhelper->getShopperGroup(JFactory::getUser()->id);
$shopperGroup = $rsUserhelper->getShoppergroupData(JFactory::getUser()->id);
[color]
status = auto
diff = auto
branch = auto
interactive = auto
ui = true
[alias]
amend = !"git commit --amend -C HEAD"
st = status
ci = commit
@gunjanpatel
gunjanpatel / phing.md
Last active August 29, 2015 13:56
phing setup in sublime text 2

Setup Phing on Sublime Text 2

  • We will create a custom build system from Tools > Build System > New Build System:
{
    "cmd": ["phing", "-f" , "$file"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.php",
 "windows":