Skip to content

Instantly share code, notes, and snippets.

View stnc's full-sized avatar
🎯
Focusing

TUNÇ Selman stnc

🎯
Focusing
View GitHub Profile
<?php
/*
Excel e export edilmiş configurable ürünlerden simple ürünler oluşturup beden özelliğine göre atayan kod parçası
Excel Formatı:
Conf ID | Beden 36 | Beden 38 ..... | Beden 54 | Renk Conf 1 | Renk Conf 2 | Renk Conf 3
*/
ini_set('display_errors', '1');
error_reporting(E_ALL);
include "app/Mage.php";
@stnc
stnc / mage.php
Created July 24, 2017 14:59
magento sipariş durumunu closed dan processing e çevrimek
<?php
ini_set('memory_limit','4000M');
ini_set('max_execution_time','999999999');
$mageFilename = dirname(realpath(__FILE__)).'/app/Mage.php';
require_once $mageFilename;
@stnc
stnc / admin-redirect.php
Created August 1, 2017 20:09 — forked from kharissulistiyo/admin-redirect.php
Admin Page Redirection After WordPress Theme Activated
/**
* WordPress snippet
* Admin page redirection
* Put this inside theme setup function
*/
global $pagenow;
if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) {
@stnc
stnc / Install-Magento-1.md
Created September 13, 2017 15:15 — forked from rafaelstz/Install-Magento-1.md
Install Magento 1.9.2.4 (With Sample Data)
@stnc
stnc / wp_cat_list.php
Created September 15, 2017 19:16
wordpress kategorileri listemeleme yontemleri
<?php
//yontem 1 dropdown olarak getirir
$args = array(
'show_option_all' => '',
'show_option_none' => '',
'option_none_value' => '-1',
'orderby' => 'ID',
'order' => 'ASC',
'show_count' => 0,
'hide_empty' => 1,
@stnc
stnc / shopping_cart_sales_rule_with_coupon.php
Created October 19, 2017 19:26 — forked from antoinekociuba/shopping_cart_sales_rule_with_coupon.php
Magento - Create shopping cart price rule with a specific coupon code programmatically.
<?php
/**
* Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically
*/
// All customer group ids
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds();
// SalesRule Rule model
$rule = Mage::getModel('salesrule/rule');
@stnc
stnc / index.html
Created November 16, 2017 19:48
google map example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Yurtdışı Mağazalarımız</title>
<link href='//fonts.googleapis.com/css?family=PT Sans:400,300,500,600,700' rel='stylesheet' type='text/css'>
<link href="//fonts.googleapis.com/css?family=Playfair Display:200,200italic,300,300italic,400,400italic,500,500italic,600italic,600italic,700,700italic,800,800italic,900,900italic&subset=latin,cyrillic-ext,cyrillic,greek-ext,greek,vietnamese,latin-ext" rel="stylesheet" type="text/css" />
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCvJBm85qq8-jueHszBS4_9TdtgrHnO4yE"
type="text/javascript"></script>
@stnc
stnc / maps2.html
Created November 17, 2017 00:21
google maps example for geocode({location
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps</title>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize&key=AIzaSyCvJBm85qq8-jueHszBS4_9TdtgrHnO4yE"></script>
</head>
@stnc
stnc / craw.go
Last active November 29, 2017 12:45
goLang simple crawler
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
@stnc
stnc / goCraw2.go
Last active December 17, 2017 16:49
go lang crawler concurrency and sync example
package main
import (
"database/sql"
"fmt"
"io/ioutil"
"net/http"
"strconv"
"sync"
"time"