Skip to content

Instantly share code, notes, and snippets.

View fmtarif's full-sized avatar

Faisal Muhammad fmtarif

View GitHub Profile
@fmtarif
fmtarif / Artisan.php
Created August 13, 2016 04:07
Laravel Cheat Sheet
php artisan --help OR -h
php artisan --quiet OR -q
php artisan --version OR -V
php artisan --no-interaction OR -n
php artisan --ansi
php artisan --no-ansi
php artisan --env
// -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
php artisan --verbose
@fmtarif
fmtarif / mysql-snippets.sql
Last active August 17, 2016 06:12 — forked from igniteflow/mysql-snippets.sql
#mysql MySQL Snippets
---------
-- Random Notes
-- From http://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
-- #1 boolean is not a distinct type in MySQL; just a synonym for tinyint(1);
-- #2 the values TRUE and FALSE are merely aliases for 1 and 0
-----------
/* match a string at the beginning of string */
SELECT 'Test' REGEXP '^The'; -- 0
SELECT 'The Test' REGEXP '^The'; -- 1
@fmtarif
fmtarif / bash-cheatsheet.sh
Created July 28, 2017 17:16 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@fmtarif
fmtarif / wptest.sh
Created July 31, 2017 14:58 — forked from jasondewitt/wptest.sh
Install wptest.io via wp-cli
#!/bin/bash
echo "installing WP test content"
wp plugin install wordpress-importer --activate
curl -OL https://raw.githubusercontent.com/manovotny/wptest/master/wptest.xml
wp import wptest.xml --authors=create
wp plugin uninstall wordpress-importer --deactivate
rm wptest.xml
@fmtarif
fmtarif / README.md
Created July 31, 2017 15:02 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@fmtarif
fmtarif / wp_auto_install.sh
Created August 1, 2017 14:26 — forked from nicomollet/wp_auto_install.sh
WP-CLI auto install script
#!/bin/bash
# Default options
LOCALE="fr_FR"
DB_HOST='localhost'
VIRUSTOTAL_KEY='YOUR_KEY'
printf "Name of the project? cf My Project: "
read PROJECT_NAME
@fmtarif
fmtarif / wp-setup.sh
Created August 1, 2017 14:26 — forked from mattbanks/wp-setup.sh
Scaffold a new WordPress development site in Alfred, utilizing WP-CLI. Use this script to run as a Terminal Script. Customize for your theme needs, plugin needs, etc.
# Create directory for new site
cd ~/Sites
mkdir {query}
cd {query}
# Download latest version of WordPress
wp core download
# Setup wp-config file with WP_DEBUG enabled
wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP
@fmtarif
fmtarif / wp-cli-install-rec-plugins
Created August 3, 2017 01:03 — forked from MikeNGarrett/wp-cli-install-rec-plugins
Chained WordPress CLI commands to install and activate recommended plugins.
# wordpress-seo provides ability to edit meta information and provides sitemap.
# w3-total-cache provides advanced caching no matter the server technology available.
# better-wp-security provides brute force protection and a number of WordPress enhancements.
# google-analytics-for-wordpress provides robust Google Analytics integration through the Google API.
# redirection detects 404s and 301s and allows admins to set up redirects in the WP admin.
# ewww-image-optimizer provides automatic optimization of uploaded images with local libraries instead of cloud-based services.
# backupwordpress simple backup solution that can store backups above web root.
# relevanssi provides better site search using a local index.
# cloudflare is the best. Free automatic CDN and security solution.
# jarvis is a quick search for the WordPress admin. Indespensible.
@fmtarif
fmtarif / xampp_php7_xdebug.md
Created September 16, 2017 14:51 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@fmtarif
fmtarif / angularjs_directive_attribute_explanation.md
Created September 26, 2017 17:13 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>