Skip to content

Instantly share code, notes, and snippets.

View Esirei's full-sized avatar

Akpesiri Okorigba Esirei

View GitHub Profile
@reinink
reinink / inertia-attribute.js
Last active June 14, 2022 03:29
Global Inertia.js click event handler
import { Inertia } from '@inertiajs/inertia'
document.addEventListener('click', (event) => {
if (
event.target.tagName.toLowerCase() === 'a' &&
event.target.hasAttribute('inertia') &&
!event.target.isContentEditable &&
!event.defaultPrevented &&
!event.shiftKey &&
!event.ctrlKey &&
// resources/js/services/Form.js
import FormErrors from './FormErrors'
export default class {
constructor (initialData = {}, submitCallback = null) {
this._initialData = initialData
this._submitCallback = submitCallback
this.errors = new FormErrors()
@stancl
stancl / ci.yml
Created May 17, 2020 07:39
Minimal GitHub Action example for running phpunit
name: CI
on: [ push, pull_request ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@koramit
koramit / laravel-7-vue-inertiajs-tailwindcss.md
Created April 22, 2020 14:47
# Laravel + Vuejs + Inertiajs + Tailwindcss Config

Laravel + Vuejs + Inertiajs + Tailwindcss Config

Setup dependencies

from Laravel fresh install

Laravel packages

# free Login/Register controller
composer require laravel/ui
@joshm1204
joshm1204 / 00_Heroku-Release-Phase-Review-Apps-Rails_README.md
Created November 20, 2019 17:18 — forked from stevenharman/00_Heroku-Release-Phase-Review-Apps-Rails_README.md
Heroku Release Phase script for managing Rails DB migrations, and playing nice with Review Apps and postdeploy scripts

Heroku Release Phase + Review Apps + Rails

This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps. Further, this particular set up plays nicely with Heroku Review Apps in that the release phase script will:

  1. Fail, loudly, if the DB does not yet exist.
  2. Load the DB schema if the current schema version (as determined by bin/rails db:version) is 0.
  3. Run DB migrations otherwise.

For a "normal" app that usually means it will run the DB migrations.

@Beneboe
Beneboe / how-to-setup-verified-commits.md
Last active June 18, 2024 17:16
How to Setup Verified Commits on Github
@leonardopinho
leonardopinho / base64ToFile.php
Last active June 19, 2022 11:42
Laravel: Convert base64 to file and resize the final size.
/**
* base64ToFile
* @param $base64
* @param $path
* @param int $width
* @param int $height
* @return string
* @info usage 'Image' => Intervention\Image\Facades\Image::class
*/
public static function base64ToFile($base64, $path, $width = 400, $height = 400)
@joyrexus
joyrexus / README.md
Last active June 19, 2024 09:35 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})