Skip to content

Instantly share code, notes, and snippets.

View alixcan's full-sized avatar
💭
I may be slow to respond.

Alican alixcan

💭
I may be slow to respond.
View GitHub Profile
@alixcan
alixcan / DuplicateResource.php
Created June 14, 2021 19:07 — forked from ns139426/DuplicateResource.php
Duplicate Resource Action for Laravel Nova
<?php
namespace App\Nova\Actions;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;
use Laravel\Nova\Actions\Action;
use Laravel\Nova\Fields\ActionFields;
@alixcan
alixcan / deploy.sh
Created June 9, 2021 15:50 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin master
@alixcan
alixcan / App\Traits\DisableNovaEntries.php
Created May 31, 2021 09:54
Disable Laravel Nova Create / Edit / Delete Feature on Resources.
<?php
namespace App\Traits;
trait DisableNovaEntries
{
public static function authorizedToCreate(Request $request)
{
@alixcan
alixcan / App\Traits\DisableDBEntries.php
Last active May 31, 2021 09:56
Disable eloquent Creating, Updating, Saving, Deleting actions.
<?php
namespace App\Traits;
use Illuminate\Http\Request;
trait DisableDBEntries
{
@alixcan
alixcan / -setup-windows-wsl-devenv.md
Created April 25, 2021 07:43 — forked from leodutra/-setup-windows-wsl-devenv.md
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@alixcan
alixcan / tailwind_vertical_text.html
Last active March 29, 2021 11:27
Tailwind Vertical Text With Border
<div class="flex m-20">
<div class="px-2 py-2 flex inset-0 border-l border-t border-b rounded-tl rounded-bl bg-blue-400 border-blue-700"
style="background-color: rgb(0, 83, 135)"
>
<div class="inset-0 transform rotate-180 self-center font-semibold uppercase text-2xl text-gray-100" style="writing-mode: vertical-rl; text-orientation: sideways">
Non Gradient
<span class="bg-clip-text text-transparent bg-gradient-to-r from-white to-gray-50">
/w Gradient
</span>
@alixcan
alixcan / build-publish.yml
Created November 2, 2020 19:26 — forked from milon/build-publish.yml
Github Action with Jigsaw
name: Build & Publish
on:
push:
branches:
- develop
schedule:
- cron: "0 2 * * 1-5"
jobs:
@alixcan
alixcan / LocaleMiddleware.php
Created July 31, 2020 09:22
Laravel Locale Middleware
<?php
namespace App\Http\Middleware;
use Modules\Platform\Settings\Entities\Language;
/**
* Class LocaleMiddleware
* @package App\Http\Middleware
*/
@alixcan
alixcan / Discord.php
Last active June 21, 2020 12:48
Laravel Discord WebHook Helper App\Helpers\
<?php
namespace App\Helper;
use Illuminate\Support\Facades\Http;
class Discord
{
private $title = null;