Skip to content

Instantly share code, notes, and snippets.

View palpalani's full-sized avatar

Palaniappan P palpalani

View GitHub Profile
# supervisor
#
# Author: Günter Grodotzki <[email protected]>
# Version: 2015-04-25
#
# - set param "SUPERVISE=enable" to activate
# - chmod +x supervise.sh
#
packages:
yum:
@snipe
snipe / gist:aee3b4f5793cfe0c3d39
Created March 6, 2015 07:56
Laravel Artisan command to upload fils to S3 with cache-control headers
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class MoveToS3 extends Command {
/**
* The console command name.
@lambtron
lambtron / shopify.md
Last active October 23, 2023 17:48
segment event tracking for shopify
title sidebar
Segment Event Tracking for Shopify
Shopify

Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.

The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.


@tegansnyder
tegansnyder / hhvm_magento_setup.md
Last active July 14, 2023 22:30
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
@lukebranch
lukebranch / 4GB-4Core-VPS-my.cnf
Created October 22, 2014 10:12
/etc/my.cnf config for 4GB RAM 4 Core VPS - Wordpress
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
@tegansnyder
tegansnyder / opcache.ini
Last active February 11, 2025 19:37
OpCache settings for Magento on PHP 5.5.14. Store this file as /etc/php.d/opcache.ini
; Enable Zend OPcache extension module
zend_extension=opcache.so
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0
; The OPcache shared memory storage size.
@peterchester
peterchester / gist:7504965aae068513b8c8
Created June 25, 2014 23:48
MvcImageResize - Mat's Fabulous WordPress Image Resizer
<?php
/*
Plugin Name: Mat's Fabulous Image Resizer
Description: Peter has hacked Mat's image resizer a bit to make it a stand alone plugin for the sake of team testing & inspection.
*/
/**
* Manage Image resizing on the fly to prevent a bunch of uneeded image sizes for every image uploaded
* Includes support for the Wp Smush.it plugin and will run the smush on all image sizes when generating the thumbnails. This also allow for smushing image larger than 1mb when
* using cropped sizes less than 1MB
@centminmod
centminmod / redisinfo.sh
Last active July 29, 2022 10:00
redis server info and stats for Centmin Mod installs centminmod.com. If redis password is set in /etc/redis.conf, edit the variable REDISPASSWORD='your_redis_password'
#!/bin/bash
VER=0.0.2
#########################################################
# redis server info script for CentminMod.com
# written by George Liu (eva2000) vbtechsupport.com
#########################################################
# redis password set by requirepass in /etc/redis.conf
REDISPASSWORD=''
SOCKET=n
TRINSICTIME=10
@mattzuba
mattzuba / 01_httpd_phpfpm.config
Last active December 20, 2022 19:53
Apache 2.4 / PHP-FPM 5.5 on Amazon Elastic Beanstalk
packages:
yum:
php55-fpm: []
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/26_phpfpm_config.sh":
mode: "000755"
owner: root
group: root
content: |
@MichaelJCole
MichaelJCole / heroku.sh
Last active August 29, 2015 14:01
MEAN.JS setup summary
#!/bin/bash
## Setup your MEAN.JS and Heroku dev/stage/prod environment
# http://blog.powma.com/fast-cheap-and-mean-devstageprod-server-setup-with-heroku/
# Config for your project:
YOURAPPNAME=YOUR_APP_NAME
## Create Production server