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
{{-- 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';
@michaeldyrynda
michaeldyrynda / Envoy.blade.php
Last active July 13, 2023 17:40
Laravel 5 Envoy deploy configuration
@servers([ 'remote' => 'server.example.com', ])
@setup
if ( ! isset($repo) )
{
throw new Exception('--repo must be specified');
}
if ( ! isset($base_dir) )
{
@gravitano
gravitano / Envoy.blade.php
Last active December 14, 2021 12:19
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
@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
|--------------------------------------------------------------------------
|
@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 {
@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(
@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() {
@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"
@vicgonvt
vicgonvt / deployment_guide.md
Last active March 17, 2024 06:51
Deployment Guide for Ubuntu Server from Scratch with Laravel
@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