Skip to content

Instantly share code, notes, and snippets.

View derekphilipau's full-sized avatar
🔥
makin' pots

Derek Philip Au derekphilipau

🔥
makin' pots
View GitHub Profile
@mmachatschek
mmachatschek / ScoutSync.php
Last active January 22, 2023 00:33
Laravel Scout Sync MeiliSearch Index Settings
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Laravel\Scout\EngineManager;
use Laravel\Scout\Engines\MeiliSearchEngine;
use MeiliSearch\Client;
@poul-kg
poul-kg / valet.conf
Last active April 30, 2024 14:09
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@naveenyagati
naveenyagati / Laravel PHP7 LEMP DigitalOcean.md
Last active September 1, 2020 03:59
Configuration for Installing Laravel with LEMP on Ubuntu 16.04 on Digital Ocean

Steps to install latest Laravel with LEMP on Digital Ocean Ubuntu 16.4

This tutorial is made based upon my experiences.In DigitalOcean Firewall in Configured by default so no changes are needed.Let's Encrypt has been pre-installed for us in Digita Ocean, please see: http://do.co/le-nginx

Install PHP 7 on Ubuntu

sudo apt-get update
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get install zip unzip
sudo apt-get install -y php7.0 php7.0-fpm php7.0-mysql php7.0-zip php7.0-gd
@jacobmllr95
jacobmllr95 / imagick3.4.3-PHP7.1-forge.sh
Last active November 28, 2019 01:43 — forked from pascalbaljet/imagick-3.4.0-PHP7-forge.sh
Install Imagick 3.4.3 on PHP 7.1 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.3.tgz
tar xvzf imagick-3.4.3.tgz
@tomcardoso
tomcardoso / README.md
Last active January 10, 2020 09:22
Reusable waffle charts

Reusable waffle charts

Basic waffle charts using Mike Bostock's [http://bost.ocks.org/mike/chart/](reusable charts) convention. Waffles are configurable, as you can see below:

var waffle = new WaffleChart()
  .selector(".chart")
  .data(data)
  .useWidth(false)
 .label("Value of producers' sales in 2013, in thousands of dollars")
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc