(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
$(function(){ | |
'use strict'; | |
const dh = $('[data-hover="true"]'); | |
dh.hover( | |
function(e) { | |
$(this).parent().addClass('open'); | |
}, function(e) { | |
$('.open [data-hover="true"] + .dropdown-menu').hover( | |
function(e){ |
<meta property="og:site_name" content="[[++site_name]]" /> | |
<meta property="og:title" content="[[*longtitle]]" /> | |
<meta property="og:description" content="[[*pagetitle]] - [[++site_name]]" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:url" content="[[~[[*id]]]]" /> | |
<meta property="og:locale" content="ru_RU" /> | |
<meta property="og:image" content="[[*PageImage]]" /> |
/* Small */ | |
@media (max-width: @breakpoint-small-max) { | |
[class*='uk-push-small-'], | |
[class*='uk-pull-small-'] { position: relative; } | |
/* | |
* Push | |
*/ |
<?php | |
$doc = $modx->newObject('modResource'); | |
$doc->set('createdby', $modx->user->get('id')); | |
$allFormFields = $hook->getValues(); | |
foreach ($allFormFields as $field=>$value) | |
{ | |
$doc->set($field, $value); | |
} |
<?php | |
/* Set plugin to run on "OnManagerPageBeforeRender" | |
*/ | |
$user = $modx->getUser(); | |
$restricted = true; | |
if($user) { | |
$restricted = (!$user->isMember(array('Administrator'))); | |
} | |
if($restricted){ | |
$modx->regClientStartupHTMLBlock('<style type="text/css">.deleted{display:none;}</style>'); |
<?php | |
/** devChunk MODX Output Modifier ** | |
** | |
** Returns an alternate chunk to users in the groups defined below | |
** Usage [[$livechunk:devChunk=`alternatechunk`]] | |
** | |
**/ | |
$user = $modx->getUser(); | |
$restricted = true; |
<?php | |
/* | |
** richIntro | |
** Plugin checks if introtext is filled in yet, and hides it if not. Run 'onDocFormRender' | |
** http://g.recordit.co/VOYqBC3CnS.gif | |
*/ | |
$introtext = empty($resource->get('introtext')); | |
if($introtext){ | |
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() { | |
var introtext = Ext.getCmp("modx-resource-introtext"); |
archey | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management | |
# 6. Networking | |
# 7. System Operations & Information |
<?php | |
/* Based on https://gist.github.com/OptimusCrime/dac5deec0d65872740c9d7bccdc5e336 | |
** Add system setting named "max_image_dimension" to set a max height or width for images | |
*/ | |
if(!function_exists(autoRotateImage)) { | |
function autoRotateImage($image,$max_image_dimension = 0) { | |
$orientation = $image->getImageOrientation(); | |
switch($orientation) { | |
case imagick::ORIENTATION_BOTTOMRIGHT: |