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
var data = [ | |
{ | |
name: 'Kyle', | |
occupation: 'Fashion Designer' | |
}, | |
{ | |
name: 'Liza', | |
occupation: 'Web Developer' | |
}, | |
{ |
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 artisan make:model Todo -mcr | |
php artisan migrate |
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
define([ | |
'jquery', | |
'matchMedia', | |
'domReady!' | |
], function ($, mediaCheck) { | |
'use strict'; | |
/*...*/ | |
mediaCheck({ | |
media: '(min-width: 768px)', | |
// Switch to Desktop Version |
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
git add -A && git commit -m "Your Message" |
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 bin/magento setup:install --base-url={base_url} \ | |
--db-host=localhost --db-name={db_name} --db-user={db_username} --db-password={db_password} \ | |
--admin-firstname={name} --admin-lastname={lastname} --admin-email={email} \ | |
--admin-user=admin --admin-password={admin_pass} --language=es_ES \ | |
--currency=EUR --timezone=Europe/Madrid --use-rewrites=1 |
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
var isDateSupported = function () { | |
var input = document.createElement('input'); | |
var value = 'a'; | |
input.setAttribute('type', 'date'); | |
input.setAttribute('value', value); | |
return (input.value !== value); | |
}; | |
if (isDateSupported()) { | |
// Browser native date pickers are supported! |
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
mysql -u your_user -p | |
mysql> show open tables where in_use>0; | |
mysql> show processlist; | |
mysql> kill put_process_id_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
SET SQL_MODE='ALLOW_INVALID_DATES'; |
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
/** | |
* Randomly shuffle an array | |
* https://stackoverflow.com/a/2450976/1293256 | |
* @param {Array} array The array to shuffle | |
* @return {String} The first item in the shuffled array | |
*/ | |
var shuffle = function (array) { | |
var currentIndex = array.length; | |
var temporaryValue, randomIndex; |
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
/*! | |
* Check if an element is out of the viewport | |
* (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com | |
* @param {Node} elem The element to check | |
* @return {Object} A set of booleans for each side of the element | |
*/ | |
var isOutOfViewport = function (elem) { | |
// Get element's bounding | |
var bounding = elem.getBoundingClientRect(); |