Skip to content

Instantly share code, notes, and snippets.

View sebastian-marinescu's full-sized avatar
🤓

Sebastian G. Marinescu sebastian-marinescu

🤓
View GitHub Profile
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active February 8, 2025 12:35
Web platform status links
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@sepiariver
sepiariver / cbGetFieldContent.snippet.php
Last active December 21, 2017 12:18
Modified Content Blocks snippet tries a comma separated list of fields, in order of priority, until a value is found or nothing is returned.
<?php
/**
* Use the cbGetFieldContent snippet to get the content of a particular field.
*
* For example, this can be useful if you need to get a bit of content
* in a getResources call
*
* Example usage:
*
* [[cbGetFieldContent?
@jgravois
jgravois / _webserver.md
Last active August 21, 2025 08:53
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@michaelhoang
michaelhoang / command-generate-image.php
Last active September 21, 2020 19:31
All about Prestashop
<?php
$timer_start = microtime(true);
if (!defined('_PS_ADMIN_DIR_'))
define('_PS_ADMIN_DIR_', getcwd());
if (!defined('PS_ADMIN_DIR'))
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_);
require(_PS_ADMIN_DIR_ . '/../config/config.inc.php');
require(_PS_ADMIN_DIR_ . '/functions.php');
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active January 7, 2025 16:25
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@matdave
matdave / hideDeleted
Last active June 4, 2017 13:53
HideDeleted
<?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>');
@chinhodado
chinhodado / gist:6fc37def3e12ea09f785
Created January 9, 2015 02:57
How to use meld with Sourcetree on Windows
  • Install meld
  • Add location of meld.exe to the PATH, e.g. C:\Program Files (x86)\Meld
  • In SourceTree, go to Tools/Options/Diff
  • In External Diff Tool, choose Custom
  • Enter meld in Diff Command and $LOCAL $REMOTE in Arguments
  • Click Ok and restart SourceTree
@DESIGNfromWITHIN
DESIGNfromWITHIN / gist:68c905ce692d62b0047e
Last active December 13, 2015 23:12
addContent.rersolver.php
<?php
$sources = array(
'data' => $modx->getOption('core_path') . 'components/cosmos/contentResources/',
);
$addContent = $modx->getOption('add_content', $options, false);
if ($addContent) {
$resources = include $sources['data'] . 'transport.resources.php';
foreach ($resources as $resource) {
$modx->log(xPDO::LOG_LEVEL_INFO,'Installing content');
$resource->save();