This file contains 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
#!/bin/bash | |
# Author: Aamnah Akram | |
# URL: http://aamnah.com | |
# Email: hello@aamnah.com | |
# Description: Bash script to install Opencart | |
# Usage: You can use 'curl' to run this script directly from Github. | |
# curl -L https://gist.githubusercontent.com/aamnah/93cb63fc15e708649084/raw | bash | |
# COLORS | |
Cyan='\033[0;36m' # Cyan |
This file contains 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
#!/bin/bash | |
# About: Bash script to create new Jekyll posts | |
# Author: @AamnahAkram | |
# URL: https://gist.github.com/aamnah/f89fca7906f66f6f6a12 | |
# Description: This is a more advanced version of the script which can | |
# - take options | |
# - has color coded status messages | |
# - improved code | |
# - lowercase permalinks | |
# - usage message |
This file contains 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
# Update store_id, store_name and store_url for all existing orders | |
##################################################################### | |
# store_id can be checked with `SELECT * FROM oc_store`. Default store = 0 | |
UPDATE oc_order SET store_id=0, store_name="Store Name", store_url="http://domain.com"; |
This file contains 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
# domain: domain.com | |
# public: /var/www/domain.com/public_html/ | |
<VirtualHost *:80> | |
# Admin email, Server Name (domain name), and any aliases | |
ServerAdmin hello@aamnah.com | |
ServerName www.domain.com | |
ServerAlias domain.com |
This file contains 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 | |
$email = "aamnah@aamnah.com"; | |
$email_neat = strtolower(trim($email)); | |
$email_hash = md5($email_neat); | |
$file_type = 'jpg'; | |
$size = 80; | |
$gravatar = 'http://www.gravatar.com/avatar/'. $email_hash . '.' . $file_type. '?s=' . $size .''; | |
$gravatar_image = '<img src="'. $gravatar . '" />'; |
This file contains 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
#!/bin/bash | |
### | |
# Author: AAmnah | |
# Link: http://aamnah.com | |
# Description: Install script for Opencart 2.x on a Linux (Ubuntu/Debian) server | |
### | |
# Color Reset | |
Color_Off='\033[0m' # Text Reset |
This file contains 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 | |
// Perfect Clean URL Generator | |
// Source: http://cubiq.org/the-perfect-php-clean-url-generator | |
setlocale(LC_ALL, 'en_US.UTF8'); | |
function toAscii($str, $replace=array(), $delimiter='-') { | |
if( !empty($replace) ) { | |
$str = str_replace((array)$replace, ' ', $str); | |
} |
This file contains 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 | |
// Source: http://stackoverflow.com/questions/5943368/dynamically-generating-a-qr-code-with-php | |
// Google Charts Documentation: https://developers.google.com/chart/infographics/docs/qr_codes?csw=1#overview | |
// CHart Type | |
$cht = "qr"; | |
// CHart Size | |
$chs = "300x300"; |
This file contains 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
// FLAT COLORS | |
// Source: http://www.flatuicolorpicker.com | |
$ChestnutRose: #D24D57; | |
$Pomegranate: #F22613; | |
$Thunderbird: #D91E18; | |
$OldBrick: #96281B; | |
$Flamingo: #EF4836; | |
$Valencia: #D64541; | |
$TallPoppy: #C0392B; |
This file contains 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
#!/bin/sh | |
############ | |
# Author: Aamnah | |
# URL: http://aamnah.com | |
# Based on: https://www.linode.com/docs/websites/hosting-a-website | |
############ | |
# Reset | |
Color_Off='\033[0m' # Text Reset |