Skip to content

Instantly share code, notes, and snippets.

View MagePsycho's full-sized avatar

magepsycho MagePsycho

View GitHub Profile
@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
delimiter ;;
drop procedure if exists build_catalog;;
create procedure build_catalog(IN categories INT, IN products INT)
begin
SET @category_count = 1;
SET @CATNAMEPREFIX = "Category ";
SET @CATURLKEYPREFIX = "cat-";
SET @CATURLPATHPREFIX = "catpath-";
SET @ROOTCATEGORY = 2;
SET @INCLUDEINMENU = 1;
@hofmannsven
hofmannsven / README.md
Last active April 1, 2025 06:51
Git CLI Cheatsheet
@perrygeo
perrygeo / TODO
Last active December 31, 2022 21:24
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio
@thomasfr
thomasfr / warmly.sh
Last active October 12, 2023 06:17
A wget based easy poor man`s cache warmer script
#!/bin/bash
# warmly.sh
# A wget based, easy, poor man`s cache warmer script
# https://gist.github.com/thomasfr/7926314
# The MIT License (MIT)
#
# Copyright (c) 2013,2014 Thomas Fritz <[email protected]> (http://fritzthomas.com)
#
@matthewhaworth
matthewhaworth / gist:bfc300ecb5a75618d0d5
Last active January 1, 2016 06:09
Magento Install Script
#!/bin/sh
DEFAULT_MAGENTO_VERSION=1.7.0.2
DEFAULT_MAGE_URL="http://127.0.0.1/"
if [ -z $1 ] # Magento version
then
read -p "Choose Magento version ($DEFAULT_MAGENTO_VERSION): " MAGENTO_VERSION
if [ -z "$MAGENTO_VERSION" ]
then
@tim-peterson
tim-peterson / UploadHandlerS3.php
Last active October 18, 2024 11:39
jQuery-File-Upload S3 PHP upload directly using AWS PHP SDK V2 (w/ optional Dropbox Chooser-selected files) https://github.com/blueimp/jQuery-File-Upload
<?php
use Aws\Common\Aws;
use Aws\S3\Exception\S3Exception;
// make sure the SDK is installed
// I've used Composer to autoload it: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html
/*
* jQuery File Upload Plugin PHP Class 7.1.0
* https://github.com/blueimp/jQuery-File-Upload
@nosolopau
nosolopau / deploy.rb
Created January 8, 2014 11:02
Send email notifications after deploy (with Capistrano and Rails 4). Capistrano variables reference: http://theadmin.org/articles/capistrano-variables/
# Add the following lines at the end of config/deploy.rb
Dir["config/deploy/extras/*.rb"].each { |file| load file }
set :notify_emails, ["[email protected]"]
after "deploy", "deploy:notify"
@tegansnyder
tegansnyder / MageStocker.sh
Last active June 7, 2017 11:14
MageStocker - Convert your Magento to stock disabling all extensions and your theme. Allows you to switch it back when you are done testing brining your theme and extensions back to life.
#! /bin/bash
if [ "$#" == "0" ]; then
echo
echo "Sorry cant run!"
echo "No arguments provided. Please pass this script agruments in the following format:"
echo "./magestocker.sh magento_root theme_base current_theme_name"
echo "example: "
echo "./magestocker.sh /var/www/magento default mytheme"
echo "another example:"
@homaily
homaily / gist:8672499
Last active January 16, 2025 08:03
Regex to validate saudi mobile numbers

السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .

Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .

/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/

Regex Breakdown - شرح الكود