Skip to content

Instantly share code, notes, and snippets.

@hgati
hgati / iso.csv
Created June 11, 2023 22:50
ISO 코드
GH 가나 GHANA
GA 가봉 GABON
GY 가이아나 GUYANA
GM 감비아 GAMBIA
GG 건지 섬 GUERNSEY
GP 과들루프 GUADELOUPE
GT 과테말라 GUATEMALA
GU GUAM
GD 그레나다 GRENADA
GR 그리스 GREECE
@hgati
hgati / idols.txt
Last active April 26, 2023 08:31
Kpop Idol Names from "idol" attribute_code
#GUN
(G)I-DLE
015B
100%
10cm
10X10
14U
1PUNCH
1Set
1TEAM
@hgati
hgati / magento-2.4.6-php-ext
Created March 23, 2023 09:01
Magento v2.4.6 필수 php 익스텐션
[ Magento v2.4.6 PHP extension Requirement ]
ext-bcmath
ext-ctype
ext-curl
ext-dom
ext-fileinfo
ext-filter
ext-gd
ext-hash
ext-iconv
@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 / 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 / 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 / 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 / .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 / 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 / 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{