These set of scripts are for Magento 1. For Magento 2, see this Gist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# === Updated December 2018 === | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have less or more resources available you should adjust accordingly to save CPU, | |
# RAM and disk I/O usage. | |
# The settings marked with a specific comment or the word "UPD" after the value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBaseUrl($includeTrailingSlash = FALSE) | |
{ | |
$protocol = (isset($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS']) ? 'https' : 'http'; | |
$domain = php_uname('n'); | |
$port = ''; | |
if (isset($_SERVER['HTTP_HOST'])) { | |
$domain = filter_input( | |
INPUT_SERVER, | |
'HTTP_HOST', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* (320x480) iPhone (Original, 3G, 3GS) */ | |
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
/* insert styles here */ | |
} | |
/* (320x480) Smartphone, Portrait */ | |
@media only screen and (device-width: 320px) and (orientation: portrait) { | |
/* insert styles here */ | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
use Ramsey\Uuid\Uuid; | |
trait Uuids { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir next-react-ssr && cd next-react-ssr && npm init -y && npm install --save react react-dom next && mkdir pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ffmpeg | |
brew install ffmpeg | |
# Download | |
ffmpeg -i https://foo.com/bar.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl --extract-audio --audio-format mp3 <video URL> | |
youtube-dl -i "<Youtube URL>" -o "%(title)s.%(ext)s" --extract-audio --audio-format "mp3" --audio-quality "192k" | |
youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 URL |
curl -XDELETE localhost:9200/*
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
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 update
sudo apt-get install zip unzip
NewerOlder