Skip to content

Instantly share code, notes, and snippets.

@tormjens
tormjens / README.md
Created February 22, 2019 09:25
Laravel Envoyer – conditional webpack/npm run

Laravel Envoyer - Diffed conditional webpack run/npm install

At work we use Envoyer to build our assets as part of our deployment. This has removed a lot of the headaches related to merge conflicts.

However, due to this, deployment takes a long time. Even when you just deploy a update to a controller or some other things.

We use these deployment hooks to run npm install and npm run production only if there's been changes to the source files.

The hooks should work as long as your assets are in resources/assets (which was the default up to Laravel 5.7).

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 17, 2025 11:00
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@tomysmile
tomysmile / mac-setup-redis.md
Last active April 11, 2025 18:01
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@nivv
nivv / PHP 7 - Installing imagick on Ubuntu 14.04.md
Last active November 28, 2021 11:38
Guide - Enable imagick on PHP7

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@khal3d
khal3d / is_rtl.php
Last active September 15, 2022 03:26
Check if there RTL characters (Arabic, Persian, Hebrew)
<?php
/**
* Is RTL
* Check if there RTL characters (Arabic, Persian, Hebrew)
*
* @author Khaled Attia <[email protected]>
* @param String $string
* @return bool
*/