Skip to content

Instantly share code, notes, and snippets.

View sebastian-marinescu's full-sized avatar
🤓

Sebastian G. Marinescu sebastian-marinescu

🤓
View GitHub Profile
@sebastian-marinescu
sebastian-marinescu / introRTE
Created June 30, 2016 16:21 — forked from christianseel/introRTE
RTE for introtext #modx
<?php
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
});</script>');
<?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>');
@sebastian-marinescu
sebastian-marinescu / project-check.bat
Created May 22, 2016 11:44
Check frontend and backend dependencies on current machine
@echo OFF
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
mode con:cols=64 lines=55
color 02
echo.
@sebastian-marinescu
sebastian-marinescu / project-setup-backend.bat
Created May 22, 2016 11:41
Use Gitify to install MODX inside the relative "www" folder
@echo OFF
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
mode con:cols=68 lines=26
color 2F
echo.
@sebastian-marinescu
sebastian-marinescu / flat_color.sass
Last active February 21, 2016 20:29 — forked from sdeluce/flat_color.scss
Flat UI Colors Sass
/*--------------------------*\
Flat UI Colors
\*--------------------------*/
$turquoise : #1ABC9C
$greensea : #16A085
$emerald : #2ECC71
$nephritis : #27AE60