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
@ahaneef29
ahaneef29 / laravel-on-azure-web-app-startup-command.sh
Created February 22, 2024 18:40 — forked from ali-awwad/laravel-on-azure-web-app-startup-command.sh
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 \
@ahaneef29
ahaneef29 / deploy.sh
Created November 7, 2022 19:16 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@ahaneef29
ahaneef29 / .bash_profile
Created October 13, 2022 12:51 — forked from vanderb/.bash_profile
Copy ssh public-key to clipboard on MacOS
alias sshkey="pbcopy < ~/.ssh/id_rsa.pub"
#!/bin/bash
# Update Package Index
sudo apt update
# Install Apache2, MySQL, PHP
sudo apt-get install -y php7.4 php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath
# Allow to run Apache on boot up
sudo systemctl enable apache2
@ahaneef29
ahaneef29 / deployment_guide.md
Created November 26, 2020 16:34 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@ahaneef29
ahaneef29 / phone.pipe.ts
Created November 7, 2020 10:38 — forked from Pierre-RA/phone.pipe.ts
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 {
@ahaneef29
ahaneef29 / ! PHP Scripts
Created January 22, 2020 10:59 — forked from yohanesgultom/! PHP Scripts
Random PHP scripts
Random PHP scripts
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@ahaneef29
ahaneef29 / Envoy.blade.php
Created January 22, 2020 10:36 — forked from gravitano/Envoy.blade.php
Simple laravel envoy deploy script :)
@servers(['web' => 'root@127.0.0.1'])
@setup
$root = '~/public_html';
$dir = $root . '/laravel';
$branch = 'master';
$artisan = $dir . '/artisan';
$composer = '~/composer.phar';
$repo = 'git@domain.com:username/repository.git';
@endsetup
@ahaneef29
ahaneef29 / Envoy.blade.php
Created January 22, 2020 10:36 — forked from gravitano/Envoy.blade.php
Simple laravel envoy deploy script :)
@servers(['web' => 'root@127.0.0.1'])
@setup
$root = '~/public_html';
$dir = $root . '/laravel';
$branch = 'master';
$artisan = $dir . '/artisan';
$composer = '~/composer.phar';
$repo = 'git@domain.com:username/repository.git';
@endsetup