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 / Github Webhook Tutorial.md
Created November 3, 2021 10:20 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@alixcan
alixcan / table-simple.blade.php
Created October 23, 2021 17:47 — forked from mithicher/table-simple.blade.php
Simple Laravel Blade Table Component With Alpine.js and TailwindCSS
{{--
Simple Example:
<x-table-simple
striped // default: false
:columns='[
[
"name" => "Name",
"field" => "name",
"columnClasses" => "", // classes to style table th
"rowClasses" => "" // classes to style table td
<script>
(function() {
var frame = 0;
var frames = [
"This",
"is",
"SPARTA!",
" ",
"SPARTA!",
@alixcan
alixcan / forgeLikeServerSetup.md
Created July 28, 2021 07:41 — forked from introwit/forgeLikeServerSetup.md
Personally written version of Chris Fidao's video on setting up a Forge like server

Let's Log in!

  • Create ssh pair for login on a fresh DO droplet.
  • ssh into the server
  • apt-get update It updates server's knowledgeable packages. Not technically updates any software.

Alright, let's start installing our stuff boys!

  • apt-get install -y git tmux vim curl wget zip unzip htop -y flag to say yes to all prompts
  • Adding additional repositories so that we can get latest version of the softwares from this respective repositories of them:
  • For NGINX: add-apt-repository -y ppa:nginx/development (Development branch of nginx repo is actually what they consider stable because its stable + bug-fixes, its not exactly the dev branch)
  • For PHP: add-apt-repository -y ppa:ondrej/php
@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