Skip to content

Instantly share code, notes, and snippets.

View aytacmalkoc's full-sized avatar
🌎
develop for humans

Aytac Malkoc aytacmalkoc

🌎
develop for humans
View GitHub Profile
@aytacmalkoc
aytacmalkoc / .bashrc
Last active April 18, 2024 07:07
Git Bash aliases for Laravel Artisan
alias pa='php artisan'
alias pas='pa serve'
alias pam='pa migrate'
alias pamf='pa migrate:fresh'
alias pamfs='pamf --seed'
alias migration='pa make:migration'
alias model='pa make:model'
alias controller='pa make:controller'
alias policy='pa make:policy'
alias middleware='pa make:middleware'
@aytacmalkoc
aytacmalkoc / spacing.css
Created September 23, 2023 23:12
CSS margin classes
/* Top */
.mt-10 {
margin-top: 10px;
}
.mt-20 {
margin-top: 20px;
}
.mt-30 {
/**
* @author Rob W <gwnRob@gmail.com>
* @website https://stackoverflow.com/a/7513356/938089
* @version 20190409
* @description Executes function on a framed YouTube video (see website link)
* For a full list of possible functions, see:
* https://developers.google.com/youtube/js_api_reference
* @param String frame_id The id of (the div containing) the frame
* @param String func Desired function to call, eg. "playVideo"
* (Function) Function to call when the player is ready.
@aytacmalkoc
aytacmalkoc / google-bots-ips.json
Created November 8, 2023 07:32
Google Bots IP Range (IPV4 - IPV6)
["2001:4860:4801:2008::1","2001:4860:4801:2008::2","2001:4860:4801:2008::3","2001:4860:4801:2008::4","2001:4860:4801:2008::5","2001:4860:4801:2008::6","2001:4860:4801:2008::7","2001:4860:4801:2008::8","2001:4860:4801:2008::9","2001:4860:4801:2008::10","2001:4860:4801:2008::11","2001:4860:4801:2008::12","2001:4860:4801:2008::13","2001:4860:4801:2008::14","2001:4860:4801:2008::15","2001:4860:4801:2008::16","2001:4860:4801:2008::17","2001:4860:4801:2008::18","2001:4860:4801:2008::19","2001:4860:4801:2008::20","2001:4860:4801:2008::21","2001:4860:4801:2008::22","2001:4860:4801:2008::23","2001:4860:4801:2008::24","2001:4860:4801:2008::25","2001:4860:4801:2008::26","2001:4860:4801:2008::27","2001:4860:4801:2008::28","2001:4860:4801:2008::29","2001:4860:4801:2008::30","2001:4860:4801:2008::31","2001:4860:4801:2008::32","2001:4860:4801:2008::33","2001:4860:4801:2008::34","2001:4860:4801:2008::35","2001:4860:4801:2008::36","2001:4860:4801:2008::37","2001:4860:4801:2008::38","2001:4860:4801:2008::39","2001:4860:4801:20
@aytacmalkoc
aytacmalkoc / bootstrap-utility-classes.css
Last active December 22, 2023 07:00
Bootstrap margin, padding and text-align classes with media queries
.m-0 {
margin: 0 !important;
}
.m-1 {
margin: 0.25rem !important;
}
.m-2 {
margin: 0.5rem !important;
@aytacmalkoc
aytacmalkoc / helpers.php
Last active June 27, 2024 23:40
Laravel route_is helper
<?php
if (!function_exists('route_is')) {
function route_is(string|array $routeNames): bool
{
$currentRoute = \Illuminate\Support\Facades\Route::currentRouteName();
$routeNames = (array) $routeNames;
return collect($routeNames)->contains(fn($routeName) => \Illuminate\Support\Str::is($routeName, $currentRoute));