Skip to content

Instantly share code, notes, and snippets.

View melih's full-sized avatar
🏡
Working from home

Melih Erkin Sarıçam melih

🏡
Working from home
View GitHub Profile
@melih
melih / HandleInertiaRequests.php
Created August 22, 2024 16:24 — forked from Biegalski-LLC/HandleInertiaRequests.php
Add Permission & Roles In Laravel Jetstream Inertia
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Inertia\Middleware;
use Tightenco\Ziggy\Ziggy;
class HandleInertiaRequests extends Middleware
{
@melih
melih / slugify.js
Created July 24, 2021 08:48 — forked from hagemann/slugify.js
Slugify makes a string URI-friendly
function slugify(string) {
const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıIłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;'
const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------'
const p = new RegExp(a.split('').join('|'), 'g')
return string.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-]+/g, '') // Remove all non-word characters
@melih
melih / tr_countrycodes.sql
Created January 21, 2018 11:49
Türkçe Ülke Telefon Kodları
INSERT INTO `cc` (`id`, `cc`, `display_name`) VALUES
(1, 1, 'Amerika Birleşik Devletleri'),
(2, 1, 'Kanada'),
(3, 7, 'Kazakistan'),
(4, 7, 'Rusya Federasyonu'),
(5, 20, 'Mısır'),
(6, 27, 'Güney Afrika Cumhuriyeti'),
(7, 30, 'Yunanistan'),
(8, 31, 'Hollanda'),
(9, 32, 'Belçika'),
@melih
melih / ubuntu-server-setup-16.04-LAMP.md
Created October 23, 2017 17:11 — forked from Otienoh/ubuntu-server-setup-16.04-LAMP.md
LAMP Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

The setup installs the following software:

  • Apache
  • MySQL
  • PHP
  • Node
@melih
melih / _mixins.scss
Created October 16, 2017 22:21 — forked from garyharan/_mixins.scss
Useful scss mixins (rounded corners, gradients, text-field, button)
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}
bin,banka_kodu,banka_adi,type,sub_type,virtual,prepaid
413226,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM
444676,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,CLASSIC
444677,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,GOLD
444678,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM
453955,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
453956,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, GOLD
454671,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
454672,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
454673,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, BUSINESS
@melih
melih / vergi_daireleri.sql
Created May 17, 2017 14:37 — forked from ridvanucok/vergi_daireleri.sql
Türkiye Vergi Daireleri Veri Tabanı // Turkey Tax Departments Database
CREATE TABLE `vergi_daireleri` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`plaka` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
`il` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`ilce` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`daire` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
INSERT INTO vergi_daireleri (id, plaka, il, ilce, daire) VALUES (1, '01', 'ADANA', 'Merkez', '5 Ocak Vergi Dairesi Müdürlüğü');
@melih
melih / config.json
Created February 11, 2017 11:41 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",