List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
// If you want inserted images in a CKEditor to be responsive | |
// you can use the following code. It creates a htmlfilter for the | |
// image tag that replaces inline "width" and "style" definitions with | |
// their corresponding attributes and add's (in this example) the | |
// Bootstrap "img-responsive" class. | |
CKEDITOR.on('instanceReady', function (ev) { | |
ev.editor.dataProcessor.htmlFilter.addRules( { | |
elements : { | |
img: function( el ) { | |
// Add bootstrap "img-responsive" class to each inserted image |
@echo off | |
:: change the path below to match your installed version | |
SET WebStormPath=C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe | |
echo Adding file entries | |
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f | |
{ | |
"fas fa-address-book","fas fa-address-card","fas fa-adjust","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fas fa-allergies","fas fa-ambulance","fas fa-american-sign-language-interpreting","fas fa-anchor","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-archive","fas fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fas fa-at","fas fa-audio-description","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fas fa-barcode","fas fa-bars", |
function fa_icons() { | |
return array ( | |
'fab fa-500px' => __( '500px', 'buildr' ), | |
'fab fa-accessible-icon' => __( 'accessible-icon', 'buildr' ), | |
'fab fa-accusoft' => __( 'accusoft', 'buildr' ), | |
'fas fa-address-book' => __( 'address-book', 'buildr' ), | |
'far fa-address-book' => __( 'address-book', 'buildr' ), | |
'fas fa-address-card' => __( 'address-card', 'buildr' ), | |
'far fa-address-card' => __( 'address-card', 'buildr' ), |
(function ($) { | |
var _loadThen = $.fn.loadThen; | |
/** | |
* An alternative to jQuery's ajax load() function that has the same interface | |
* except it does not take a callback function, but instead it returns a promise. | |
* The promise will be resolved when the content are loaded into the set of matched elements. | |
* @param url {string} A string containing the URL to which the request is sent. | |
* @param params {object or string} A plain object or string that is sent to the server with the request. | |
* @returns {jQuery Promise} with params (html, status, jqXHR). |