Skip to content

Instantly share code, notes, and snippets.

View fawzanm's full-sized avatar
🎯
Focusing

Mohammed Fawzan fawzanm

🎯
Focusing
View GitHub Profile
@fawzanm
fawzanm / docx-cli-search.md
Created July 20, 2021 02:42 — forked from pmbaumgartner/docx-cli-search.md
Search the contents of Word docs via CLI

Search Contents of Word Documents from the Terminal

You'll need ripgrep and pandoc to get started. You can read more about ripgrep here and pandoc here. I use both of these frequently and they're quite helpful.

You can install them both with homebrew:

brew install pandoc ripgrep
@fawzanm
fawzanm / webpack.mix.js
Created April 20, 2020 08:17 — forked from julienbourdeau/webpack.mix.js
Laravel Mix with multiple Tailwind config and PurgeCSS (separate Admin dashboard and Front app)
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
const rootPath = Mix.paths.root.bind(Mix.paths);
const tailwindPlugins = function(configFile, paths) {
const pluginList = [tailwindcss(configFile)];
if (mix.inProduction()) {
pluginList.push(require('@fullhuman/postcss-purgecss')({
@fawzanm
fawzanm / forge.sh
Created September 29, 2019 04:51
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)
#
@fawzanm
fawzanm / deployment.sh
Created August 10, 2019 06:12
ZERO downtime deployment script for Laravel Forge
# Original credit for the script goes to https://skepticalhippo.io/laravel-forge/2017/05/21/zero-downtime-deployments-with-laravel-forge/
# I just added a tweak to make sure that composer install must succeed to proceed the deployment.
# You can use the same trick to terminate the deployment from any point (if there is an error)
# by checking the exit code of the last command you've executed.
# Any suggestions? comments are open.
# Have fun artisans!
# Mohamed Fawzan
# :)
cd /home/forge
@fawzanm
fawzanm / .profile
Last active January 8, 2021 01:16
Frequently used command aliases for Laravel Development
alias fire="git add .; git commit -am 'Emergency Updates'; git push"
alias pa="php artisan"
alias msf="php artisan migrate:fresh --seed"
alias pac="php artisan config:cache; php artisan cache:clear; php artisan config:clear; php artisan view:clear"
alias cda="composer dump-autoload"