Skip to content

Instantly share code, notes, and snippets.

@hgati
hgati / magento-1.7-fix-installation-error-with-mysql-5.6.patch
Last active January 20, 2018 07:25
Fixed Magento 1.7.x Installation Error Over MySQL 5.6 (Removed a have_innodb statement)
Index: app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php (revision 6ea22c9abff24da3f3f2aaed59c527ff803c02eb)
+++ app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php (revision 6a25c653aa5df2c4be3c69fe5131449c3b210609)
@@ -59,7 +59,7 @@
public function supportEngine()
{
@hgati
hgati / support-php-7.0.22-on-magento-1.7.patch
Last active January 20, 2018 10:06
Support PHP v7.0.22 On Magento 1.7.0.2
Index: app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php (revision 6ea22c9abff24da3f3f2aaed59c527ff803c02eb)
+++ app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php (revision 07375d7d2c92ab2b07657e0d40f816c4ace33612)
@@ -61,8 +61,8 @@
$links[(int)$linkedProductId] = array();
@hgati
hgati / erpnext_magento.php
Created March 18, 2018 15:38 — forked from rmehta/erpnext_magento.php
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
@hgati
hgati / iso
Last active July 7, 2019 12:21
iso2 to iso3
AF:AFG
AX:ALA
AL:ALB
DZ:DZA
AS:ASM
AD:AND
AO:AGO
AI:AIA
AQ:ATA
AG:ATG
@hgati
hgati / .vimrc
Last active August 28, 2021 00:45
.vimrc 기본설정
" Vundle
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@hgati
hgati / magerun
Last active March 28, 2024 03:04
n98-magerun.phar Alias
#!/bin/bash
/usr/local/bin/n98-magerun2.phar --root-dir=/var/www/magento --skip-root-check "$@"
@hgati
hgati / warmup
Created September 1, 2021 01:31
Website crawling for full page cache warmup
#!/usr/bin/env bash
## 파라미터가 없으면 종료
if [ "$#" -lt 2 ]; then
echo "$# is Illegal number of parameters."
echo "Usage: $0 https://www.example.com example.com"
exit 1
fi
wget \
@hgati
hgati / init-letsencrypt.sh
Created September 2, 2021 01:44
Init Let's Encrypt
#!/bin/bash
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Error: docker-compose is not installed.' >&2
exit 1
fi
domains=(example.org www.example.org)
rsa_key_size=4096
data_path="./data/certbot"
@hgati
hgati / vultr_auto_snapshot.tmpl
Last active September 5, 2021 04:46
Vultr Snapshot By API
#!/bin/sh -eu
Key='YourAPIKEY'
SnapshotLimit=7
SnapshotCount=$(curl -s -H "API-Key: $Key" https://api.vultr.com/v1/snapshot/list | grep -o SNAPSHOTID | wc -l)
Fields=$(curl -s -H "API-Key: $Key" https://api.vultr.com/v1/snapshot/list | grep -o '"' | wc -l)
LastSnapshotField=$((Fields - 24))
LastSnapshotID=$(curl -s -H "API-Key: $Key" https://api.vultr.com/v1/snapshot/list | grep '"' | cut -d '"' -f $LastSnapshotField)
if [ "$SnapshotCount" -eq "$SnapshotLimit" ]
@hgati
hgati / add-private-network.sh
Created August 21, 2022 07:16 — forked from ckcks12/add-private-network.sh
vultr.com scripts
# echo setting
r='\033[0;31m'
y='\033[1;33m'
g='\033[0;32m'
b='\033[1;34m'
x='\033[0m'
function log() {
echo -e $@${x}
}