Skip to content

Instantly share code, notes, and snippets.

View ferdiunal's full-sized avatar
🏠
Working from home

Ferdi ÜNAL ferdiunal

🏠
Working from home
View GitHub Profile
<?php
// Kullanacağımız array'yı belirleyelim
// Bu herhangi biri olabilir.
$array = [
'settings' => [
'public' => [
'create' => true,
'update' => true,
'delete' => true,
],
@ferdiunal
ferdiunal / !NOTE.md
Created April 7, 2020 10:05 — forked from mehranhadidi/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
@ferdiunal
ferdiunal / sse.go
Created September 5, 2019 20:16 — forked from ismasan/sse.go
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
-----BEGIN RSA PRIVATE KEY-----
MIIJJgIBAAKCAgBoe2f+iDWW+xMsnKeL31ZRxPw0Gvj8Eku8MTWkFwISRF7vwepx
JWHGs2Ud/v7BZwh+aPlhp32n5JI431/XW/BFcGk3bS3tYkUBEP+cpwWJe9UDaQwN
wF3eg4WWb6BEPerOiWKUxcjz4MKG7Bw6erx4VxjxBGDBXOELZnP9G3LrnMujKoTC
Rig3Ffug3Pclr5bu04wtZ83sGZT2KX1qszwBX9kT0dOd3tAk4HmU0Kq95lc30pNA
zvJ01SfMlaolQ0YCkK1Bqe3d9HqNnv0zNILtJzNGZKJSos4iJPv+nAdwEQXVZWNt
wwdhnHLDwhMo9WKqnONTou8xKisIZfnkznb1bTAEZh/axAsVVertKQ+HryDtM+xC
PWpj4OUz0nctcb2CvAYdz+Q+csr4Fsku/8tPELJBX4Z42D1j34zWJa8CZZHIds79
luHHZdOOoLubLWs2tyKJPTirDPOPspp8uESDTDOIjtH9uIYPD8SgSWeVeBiikelM
VFKYbOmnT1ACYAwpyKOEnxN5BHtIiz6MPxAwIWLJdEduHqm5nAJYBDWgkdepWzMb
try {
$operationLogCount = OperationLog::where('action', self::YEMEK_SEPETI_DISPATCH_TYPE)
->where('type', self::YEMEK_SEPETI_DISPATCH_TYPE)
->where('status', 1)
->where('order_id', $order->id)
->count();
if (count($radiusList) > $operationLogCount) {
$radius = $radiusList[$operationLogCount];
$order->radius = $radius;
@ferdiunal
ferdiunal / Vps Kurulumu
Created October 25, 2018 13:07 — forked from bulentsakarya/Vps Kurulumu
Ubuntu + Apache + MySQL + Php + Let's Encrypt + Mod Pagespeed + WordPress
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoclean
sudo apt-get autoremove
adduser sakarya
usermod -aG sudo sakarya
ufw app list
ufw allow OpenSSH
@ferdiunal
ferdiunal / helpers.py
Created July 6, 2018 20:15
Bir işlemi belirli bir sayıda tekrar deneyin.
"""
Retry an operation a given number of times.
Bir işlemi belirli bir sayıda tekrar deneyin.
"""
def retry(times, callback):
try:
if not times:
return
return callback()
except:
// inside boot()
resolve(EngineManager::class)->extend('elasticsearch', function () {
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index'));
});
@ferdiunal
ferdiunal / gist:c062ee333d0bbcea65152b563ecbc479
Created July 28, 2017 08:34 — forked from ziyahan/gist:3938729
Vergi Kimlik No Doğrulama Algoritması
function vergikimlik(kno) {
var v1 = 0;
var v2 = 0;
var v3 = 0;
var v4 = 0;
var v5 = 0;
var v6 = 0;
var v7 = 0;
var v8 = 0;
var v9 = 0;
@ferdiunal
ferdiunal / helpers.php
Created January 14, 2017 12:05
PHP referans degeri
<?
if (!function_exists('getRam')) {
function getRam($value)
{
return $value = &$value;
}
}