Skip to content

Instantly share code, notes, and snippets.

@tmp2000
tmp2000 / add to main after requires of classes.php
Created October 14, 2016 16:00 — forked from clonemeagain/add to main after requires of classes.php
osTicket 1.7.2+ MOD Archive Tickets. Modifies the delete ticket function to first create a PDF export of the file, includes a cron-runnable script to auto-prune the db!
<?php
/** MOD_Archive START COPY FROM THIS LINE, paste beneath /main.inc.php " require(INCLUDE_DIR.'mysql.php');"
* Which subfolder would you like to start archiving tickets into?
*/
define ( 'BACKUPDIR', ROOT_DIR . 'backups' . DIRECTORY_SEPARATOR );
/**
* Change to false to show more output, makes cron send emails which you may not care about.
*/
define ( 'CRONFRIENDLY', true );
@tmp2000
tmp2000 / 1) Install
Last active August 29, 2015 14:25 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Magento Overrride with patch for fixing the db deadlock error issue
FILE PATH:
/var/www/dev.linentablecloth.com/app/code/local/Mage/Sales/Model/Abstract.php
SOURCE CODE:
<?php
/**
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
#!/bin/sh
# http://vm-192-168-11-21.shengyun.grandcloud.cn/topics/2437
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo