Skip to content

Instantly share code, notes, and snippets.

View stnc's full-sized avatar
🎯
Focusing

TUNÇ Selman stnc

🎯
Focusing
View GitHub Profile
@stnc
stnc / log.php
Created July 23, 2020 07:06
error_log_blog_example
<?php
private function creditcard_callback($postParams, $action = "")
{
$strMDStatus = isset($this->mdStatuses[$postParams["mdstatus"]]) ? $postParams["mdstatus"] : 7; // 7=Sistem hatası
if ($action == "success" && in_array($strMDStatus, array(1, 2, 3, 4))) {
// Tam Doğrulama, Kart Sahibi veya bankası sisteme kayıtlı değil, Kartın bankası sisteme kayıtlı değil, Kart sahibi sisteme daha sonra kayıt olmayı seçmiş cevaplarını alan işlemler için provizyon almaya çalışıyoruz
$strNumber = ""; // Kart bilgilerinin boş gitmesi gerekiyor
$strExpireDate = ""; // Kart bilgilerinin boş gitmesi gerekiyor
$strCVV2 = ""; // Kart bilgilerinin boş gitmesi gerekiyor
@stnc
stnc / custom_form.php
Last active May 25, 2020 21:24
Creating Custom Front End Registration and Login Forms for WordPress
<?php
/*
Plugin Name: Front End Registration and Login
Plugin URI: https://pippinsplugins.com/creating-custom-front-end-registration-and-login-forms
Description: Provides simple front end registration and login forms
Version: 1.0
Author: Pippin Williamson
Author URI: https://pippinsplugins.com
*/
@stnc
stnc / table.php
Created May 24, 2020 13:31
wordpress Custom List Table Example plugin backup
<?php
/*
Plugin Name: Custom List Table Example
Plugin URI: http://www.mattvanandel.com/
Description: A highly documented plugin that demonstrates how to create custom List Tables using official WordPress APIs.
Version: 1.4.1
Author: Matt van Andel
Author URI: http://www.mattvanandel.com
License: GPL2
*/
@stnc
stnc / web.config
Created May 23, 2020 00:33
Azure Functions does not work if length of the request URL?
<!--
Rewrites requires Microsoft URL Rewrite Module for IIS
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
-->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
@stnc
stnc / tumblr tema kode.html
Created May 14, 2020 01:56
tumblr tema kode
<html lang="en">
<head>
<meta https-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{Title}{block:SearchPage} ({lang:Search results for SearchQuery}){/block:SearchPage}{block:PostSummary} ({PostSummary}){/block:PostSummary}</title>
<meta name="description" content="{block:IndexPage}{block:Description}{MetaDescription}{/block:Description}{/block:IndexPage}{block:PermalinkPage}{PostSummary}{/block:PermalinkPage}" />
<meta name="author" content="Peter Vidani">
<meta name="if:Show note count" content="1">
@stnc
stnc / test_a_sayer.go
Created March 4, 2020 01:15 — forked from deinspanjer/test_a_sayer.go
Example of cross-package interfaces in golang
package a
import "fmt"
type Sayer interface {
Say() string
}
type Formal struct{}
@stnc
stnc / interfacev1.go
Last active February 26, 2020 20:34
A Real-World Example of Go Interfaces
package main
// author Dirk Hoekstra
//link https://medium.com/better-programming/a-real-world-example-of-go-interfaces-98e89b2ddb67
import "fmt"
type User1 struct {
Name string
@stnc
stnc / function.php
Last active December 31, 2019 06:15
worpress Like WP REST API
<?php
/*****************************************************************
** Like WP REST API -start *******
******************************************************/
/**
*
* Registers REST API endpoints
*
@stnc
stnc / README.md
Created December 24, 2019 04:27 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@stnc
stnc / function.php
Last active December 22, 2019 01:50
wordpress categories with it depends posts (for api)
<?php
/**
* uses : http://examplewp.com/wp-json/wp/v2/categoriesAndDepencyPostList
* Registers REST API endpoints -- for accordion tab and categories with it depends posts
*
* @since 1.0.0
*/
add_action('rest_api_init', 'register_categoriesAndDepencyPostList1');
function register_categoriesAndDepencyPostList1()
{