Skip to content

Instantly share code, notes, and snippets.

View az-iar's full-sized avatar

Azri Ismail az-iar

View GitHub Profile
@lazyguru
lazyguru / Magento2ValetDriver.php
Last active March 1, 2017 19:01
Borrowed from https://github.com/laravel/valet/pull/47 with fixes so that it runs from Magento root instead of pub directory. Put this in ~/.valet/Drivers/Magento2ValetDriver.php
<?php
class Magento2ValetDriver extends ValetDriver
{
/**
* Holds the MAGE_MODE from app/etc/config.php or $ENV
*
* @var string
*/
@henriquemenezes
henriquemenezes / postgresql-set-id-seq.sql
Created March 31, 2016 12:23
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
@fideloper
fideloper / install.sh
Last active October 30, 2023 20:03
Vagrant Provisioning Script for PHP applications. This installs a LAMP stack.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'