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
@ali-awwad
ali-awwad / laravel-on-azure-web-app-startup-command.sh
Last active June 28, 2024 15:41
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 June 28, 2024 11:00
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 May 6, 2024 20:09
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 March 17, 2024 06:51
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"
@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 June 21, 2024 17:06
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(
@Pierre-RA
Pierre-RA / phone.pipe.ts
Last active February 20, 2021 11:13
Angular 2/4 Pretty Phone number pipe
import { Pipe, PipeTransform } from '@angular/core';
import { parsePhoneNumber, CountryCode } from 'libphonenumber-js/min';
@Pipe({
name: 'phone'
})
export class PhonePipe implements PipeTransform {
transform(phoneValue: number | string, country: string): any {
try {
@gvsrepins
gvsrepins / Envoy.blade.php
Last active July 13, 2023 17:40
A Laravel envoy script for deployment
@servers(['production' => 'productionserver', 'local'=> 'vagrant@127.0.0.1 -p 2222'])
{{-- Configuration section --}}
@setup
/*
|--------------------------------------------------------------------------
| Git Config
|--------------------------------------------------------------------------
|