Skip to content

Instantly share code, notes, and snippets.

View hidonet's full-sized avatar

Hidayet Ok hidonet

View GitHub Profile
## Paste this code to /magmi_path/web/head.php file before first line of code...
### Magento admin yetkilendirmesi #####################################################
function authenticate($username="",$password=""){
require "../../app/Mage.php";
Mage::app('default');
$user = Mage::getModel('admin/user');
$user->login($username,$password);
@hidonet
hidonet / gist:1ce41160f25bda89536c
Created July 9, 2015 02:30
Magento Patch 6285
Magento Community 1.9 için
##------------------------------------------
rm -f PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-07-09-03-34.sh;
wget http://www.grinet.com.tr/magento_patches/PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-07-09-03-34.sh;
sh PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-07-09-03-34.sh;
mv PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-07-09-03-34.sh PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-07-09-03-34.sh.applied;
##------------------------------------------
Magento Community 1.7.0.2 için
##------------------------------------------
@hidonet
hidonet / gist:c8b61bc6548174a51c67
Last active February 17, 2023 10:37
Türk bankaları için sanal pos test kartları
"EST (Akbank, IsBankasi, TEB, Anadolubank, Finansbank vs) " =>
"number" => "5404355404355405", "cvv" => "000", "type" => "MC", "expire_month" => "12", "expire_year" => "2019"
"GARANTI" =>
"number" => "4282209027132016", "cvv" => "232", "type" => "VI", "expire_month" => "04", "expire_year" => "2015"
"DENIZBANK (Interpos)" =>
"number" => "4090700015897901", "cvv" => "991", "type" => "VI", "expire_month" => "12", "expire_year" => "2014"
"HSBC" =>
@hidonet
hidonet / magento.stpl
Last active September 23, 2019 12:22
vestacp magento nginx template
# Template Updated At 2019-04-17
upstream php_backend_%domain_idn%_%web_ssl_port% {
server %backend_lsnr%;
#server %backend_lsnr% backup;
}
server {
listen %ip%:%web_ssl_port%;
server_name %domain_idn% %alias_idn%;
@hidonet
hidonet / gist:f4ed9c64dca5ff6c5c8aea640e0deb53
Created October 15, 2018 16:38
Background scan Cpanel server with clamav
nohup clamscan --exclude=/home/virtfs/* --suppress-ok-results --move=/viruslu/ --exclude=/viruslu/* --follow-dir-symlinks=0 --follow-file-symlinks=0 --recursive=yes --infected / &
@hidonet
hidonet / report_file_segmentizer.php
Created October 23, 2018 19:07
Magento1 Report File Segmentizer by Date
<?php
/*
Magento Report File Date Segmentor
Scans var/report directory and moves all report files to created date named directories.
Developer : Hidayet Ok ( [email protected] )
http://www.github.com/hidonet/magento_var_report_segmentor
@hidonet
hidonet / pre_virtualhost_global.conf
Created October 24, 2018 02:40
Pevent Wordpress PHP Upload Hack
<DirectoryMatch ^.*/wp-content/uploads/.*>
AllowOverride all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)\.php$ / [L,R=301]
</IfModule>
</DirectoryMatch>
@hidonet
hidonet / seconds_to_time.php
Last active March 24, 2019 21:13
Converts seconds to detailted time string...
function secondsToTime($sec) {
$ret_str = '';
$day_length = 60 * 60 * 24;
$hour_length = 60 * 60;
$minute_length = 60;
if ($sec < 1)
{
@hidonet
hidonet / sysctl.conf
Created July 19, 2019 22:16
sysctl.conf
# Kernel sysctl configuration file for Linux
#
# Version 1.14 - 2019-04-05
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
dev/*
includes/*
media/*
!media/wysiwyg/*
!/media/dhl
/media/dhl/*
!/media/dhl/logo.jpg
!/media/downloadable