Skip to content

Instantly share code, notes, and snippets.

View KABBOUCHI's full-sized avatar
🎯
Focusing

Georges KABBOUCHI KABBOUCHI

🎯
Focusing
View GitHub Profile
@KABBOUCHI
KABBOUCHI / forge_deploy.sh
Created March 17, 2018 01:40 — forked from pmatseykanets/forge_deploy.sh
Forge Deploy script
APP_DIR=/home/forge/sub.domain.com
RELEASE=$(date +%Y%m%d%H%M%S)
RELEASE_DIR=$APP_DIR/releases/$RELEASE
ARCHIVE=$RELEASE.tar.gz
PHP=php7.1
[ -d $APP_DIR/releases ] || mkdir $APP_DIR/releases
cd $APP_DIR/releases
mkdir $RELEASE_DIR
@KABBOUCHI
KABBOUCHI / forge.sh
Created March 17, 2018 01:37
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
<template>
<form @submit.prevent="onSubmit">
<b-field label="Email"
:message="formErrors.first('email')"
:type="formErrors.has('email') ? 'is-warning' : ''">
<b-input type="email"
name="email"
@input="clearErrors"
v-model="formData.email"
v-validate="{required: true, email: true}">
@KABBOUCHI
KABBOUCHI / tailwind_md_all_colours.js
Created February 14, 2018 17:22 — forked from davidpiesse/tailwind_md_all_colours.js
A colour set for Tailwind CSS that include all Material Design Colours, shades, accents and contrast colours
// https://davidpiesse.github.io/tailwind-md-colours/
//
//Notes
//
//All colours are generated from Material Design Docs
//Colours have a base, a set of shades (50-900) accent colours
//In addition a companion set of contrast colours are included for colouring text / icons
// Example usage
// class="w-full bg-red-600 text-red-600-constrast"
@KABBOUCHI
KABBOUCHI / letsencrypt_2017.md
Created January 17, 2018 23:33 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@KABBOUCHI
KABBOUCHI / .bash_profile
Created January 7, 2018 16:07 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@KABBOUCHI
KABBOUCHI / RemoteArtisan.php
Created December 21, 2017 18:53 — forked from simonhamp/RemoteArtisan.php
RemoteArtisan: A way to call another Laravel/Lumen application's artisan command from the context of the current application.
<?php
namespace App;
use Dotenv\Dotenv;
use Symfony\Component\Process\Process;
class RemoteArtisan
{
/**
@KABBOUCHI
KABBOUCHI / EnsureQueueListenerIsRunning.php
Created October 28, 2017 17:40 — forked from ivanvermeyen/EnsureQueueListenerIsRunning.php
Ensure that the Laravel 5.1 queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@KABBOUCHI
KABBOUCHI / JSONEditor.cs
Created September 10, 2017 12:17 — forked from paullj/JSONEditor.cs
A JSON Editor in the inspector. Preview and more information in comments 🙂
using System.IO;
using System.Linq;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEditor;
using System;