Skip to content

Instantly share code, notes, and snippets.

View ilkeryilmaz's full-sized avatar
Working

ilker Yılmaz ilkeryilmaz

Working
View GitHub Profile
@ilkeryilmaz
ilkeryilmaz / gist:235af699a7733926440200f438d14d3f
Last active December 12, 2022 12:56
Feature Based Folder Structure Template
project-root
├── features
│ ├── checkout
│ │ ├── components
│ │ ├── screens --> only this folder public
│ │ ├── services
│ │ ├── utils
│ │ ├── types
│ │ ├── constants
│ ├── order
curl 'https://api.korvo.co/v1/payments/227/payout-completed-transactions?date=16/09/2021' \
-H 'authority: api.korvo.co' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'sec-ch-ua: "Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"' \
-H 'accept: application/json' \
-H 'authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwYWtvam9yNDY3QGZ4c2VsbGVyLmNvbSIsInVzZXJUeXBlIjoiQlVTSU5FU1MiLCJleHAiOjE2NjMyNzQ2OTksInVzZXJJZCI6MjI3LCJpYXQiOjE2MzE3Mzg2OTl9.bWekHGNyhgoG8sgV-bh6bjGrAZdMgGziB6g5pfQpbuOem_x6SeunBoMH3jMUeq25Clkwjy576co1VFMzpru04g' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36' \
-H 'sec-ch-ua-platform: "macOS"' \
@ilkeryilmaz
ilkeryilmaz / single-product
Last active August 23, 2021 21:10
create-error
curl 'https://api.korvo.co/v1/payments/156' \
-H 'authority: api.korvo.co' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"' \
-H 'accept: application/json' \
-H 'authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoZWxsb0Brb3J2by5jbyIsInVzZXJUeXBlIjoiQlVTSU5FU1MiLCJleHAiOjE2NjEyODczNDcsInVzZXJJZCI6MTU2LCJpYXQiOjE2Mjk3NTEzNDd9.Jx1SpHSHrdO9WNdV3N_DmfO4H0cN_2CXlN7nRFcQ_68azKySDBWOZHilEckfYijm3mfiB80RN9rVymCbg3Uaxw' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36' \
-H 'origin: http://dashboard.korvo.co' \
String.prototype.turkishToLower = function(){
var string = this;
var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" };
string = string.replace(/(([İIŞĞÜÇÖ]))/g, function(letter){ return letters[letter]; })
return string.toLowerCase();
}
String.prototype.turkishToUpper = function(){
var string = this;
var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" };
// Page All Components
const components = (function(){
// Menu
let menu = function(){
}
// Search
let search = function(){
@ilkeryilmaz
ilkeryilmaz / choose.xsl
Last active September 4, 2015 12:52
XSL Code Snippets
/*
* If else
*/
<xsl:choose>
<xsl:when test="$language">
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
@ilkeryilmaz
ilkeryilmaz / index.php
Created June 6, 2015 02:03
Php array implode
$title = array('data', 'data', 'data');
$columns = implode(", ",array_keys($title));
$escaped_values = array_values($title);
$values = implode(", ", $escaped_values);
echo $values;
@ilkeryilmaz
ilkeryilmaz / url
Last active August 29, 2015 14:22
Using Youtube Data API V3 to get videos of a channel
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCUALYmnkEmx8vlxIbpr2gmw&order=date&key=AIzaSyDcUHa4cb99izxHnJFe0e5SaYOlQISNYm4&callback=foobar
//touchstart
//touchmove
//touchend
//touchcancel
//Example
document.addEventListener('touchmove', function(e) {
e.preventDefault();
var touch = e.touches[0];
alert(touch.pageX + " - " + touch.pageY);
@ilkeryilmaz
ilkeryilmaz / gist:f68662afc8eb83a6a258
Created February 3, 2015 11:41
Get the term name and url by ID
array = get_term_by('id', $select1, $taxonomy, 'ARRAY_A');
//Print
echo $array['name'];