Skip to content

Instantly share code, notes, and snippets.

View pascalbaljet's full-sized avatar

Pascal Baljet pascalbaljet

View GitHub Profile
@pascalbaljet
pascalbaljet / imagick-3.4.0-PHP7-forge.sh
Last active November 11, 2024 16:53
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.0.tgz
tar xvzf imagick-3.4.0.tgz
@pascalbaljet
pascalbaljet / blackfire-debian-ubuntu.sh
Last active May 5, 2023 11:40
Install Blackfire on Debian/Ubuntu
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Register the packagecloud key
wget -O - https://packagecloud.io/gpg.key | sudo apt-key add -
# Add deb http://packages.blackfire.io/debian any main to /etc/apt/sources.list.d/blackfire.list
openvalet() {
DIR=$(basename "$PWD")
open "http://$DIR.test"
}
vscode() {
if [ -z "$1" ]
then
code -n .
else
<script>
import Vue from "vue";
export default {
props: ["default"],
data() {
return {
attributes: {},
};
@pascalbaljet
pascalbaljet / SwapOctaneServer.php
Last active July 8, 2024 18:12
Blue-green deployment with Laravel Octane
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Console\Concerns\CallsCommands;
use Illuminate\Support\Facades\Http;
use Laravel\Forge\Forge;
use Laravel\Forge\Resources\Daemon;
{
"indentSize": 4,
"wrapAttributes": "auto",
"wrapLineLength": 200,
"endWithNewLine": true,
"endOfLine": "LF",
"useTabs": false,
"sortTailwindcssClasses": true,
"sortHtmlAttributes": "none",
"noMultipleEmptyLines": true,
@pascalbaljet
pascalbaljet / run-e2e-tests.yml
Created March 24, 2024 13:53
Run Dusk E2E Tests (GitHub Actions)
name: Run Dusk E2E Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-22.04
env:
APP_URL: "http://127.0.0.1:8000"