Skip to content

Instantly share code, notes, and snippets.

View ahaneef29's full-sized avatar
🎯
Focusing..

Haneef Ansari ahaneef29

🎯
Focusing..
  • FI
  • UAE
View GitHub Profile
@mohitmamoria
mohitmamoria / README.md
Last active April 21, 2025 18:57
Inertia.js Form Helper for Axios/API calls

Inertia.js ships with a fantastic form helper but it falls short when also using API/Axios calls in your project.

Here's a composable, built on top of the Inertia's form helper that hooks into it to replace the API calls with Axios.

To use, just replace useForm with useAPIForm.

const form = useAPIForm({
    title: '',
});
@ali-awwad
ali-awwad / laravel-on-azure-web-app-startup-command.sh
Last active February 5, 2025 13:11
Laravel On Azure Web Apps. Enabling Queues and Job Workers as well
# name this file as "startup.sh" and call it from "startup command" as "/home/startup.sh"
# check out my YouTube video "https://youtu.be/-PGhVFsOnGA"
cp /home/default /etc/nginx/sites-enabled/default
cp /home/php.ini /usr/local/etc/php/conf.d/php.ini
# install support for webp file conversion
apt-get update --allow-releaseinfo-change && apt-get install -y libfreetype6-dev \
libjpeg62-turbo-dev \
@JustinByrne
JustinByrne / laravel-ci-cd-workflow.yml
Last active May 29, 2024 21:09
Github Action to test laravel and then compile the assets to a production branch
name: CI/CD workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
testing:
@JeffreyWay
JeffreyWay / recaptcha.blade.php
Last active January 31, 2025 11:54
Recaptcha Example using Laravel, Blade Components, and Alpine
<div
x-data="recaptcha()"
x-init="init"
@recaptcha.window="execute"
></div>
@push('scripts')
<script src="https://www.google.com/recaptcha/api.js?render=explicit"></script>
<script>
@cagartner
cagartner / deploy.sh
Last active March 21, 2025 14:49
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@vicgonvt
vicgonvt / deployment_guide.md
Last active February 17, 2025 19:29
Deployment Guide for Ubuntu Server from Scratch with Laravel
@vanderb
vanderb / .bash_profile
Last active June 21, 2024 13:41
Copy ssh public-key to clipboard on MacOS
alias sshkey="pbcopy < ~/.ssh/id_rsa.pub"
@zanechua
zanechua / azure-pipelines.yml
Last active September 23, 2024 09:41
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
@nonsocode
nonsocode / n-errorbag.js
Created August 9, 2018 13:19
A simple Frontend Validation Error bag meant to work with Laravel validation
class ErrorBag {
constructor(errors = {}) {
this.setErrors(errors);
}
hasErrors() {
return !!this.keys.length;
}
get keys() {
@slightfoot
slightfoot / squircle.dart
Last active November 4, 2024 08:16
Flutter Squircle Shape
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Squircle',
home: new Scaffold(