Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mkay
mkay / debug.html.inc
Created December 6, 2017 17:13
Bootstrap 4 (beta2) debug snippet
<!-- DEBUG -->
<div style="position: fixed; z-index:999; bottom:0;">
<span class="badge badge-secondary d-none d-xl-block">XL</span>
<span class="badge badge-secondary d-none d-lg-block d-xl-none">LG</span>
<span class="badge badge-secondary d-none d-md-block d-lg-none">MD</span>
<span class="badge badge-secondary d-none d-sm-block d-md-none">SM</span>
<span class="badge badge-secondary d-block d-sm-none">XS</span>
</div>
<!-- /DEBUG -->
@mkay
mkay / inspector.html
Created May 2, 2016 15:33
Bootstrap 4 Grid Inspector
<!-- DEBUG -->
<div style="position: fixed; z-index:999; bottom:0;">
<span class="label label-default visible-xl-up hidden-lg-down">XL</span>
<span class="label label-success visible-lg-up hidden-xl-up hidden-md-down">LG</span>
<span class="label label-info visible-md-up hidden-lg-up hidden-sm-down">MD</span>
<span class="label label-primary visible-sm-up hidden-md-up hidden-xs-down">SM</span>
<span class="label label-warning visible-xs-up hidden-sm-up">XS</span>
</div>
<!-- /DEBUG -->

####Manager:

System Settings > ckeditor > Remove plugins
remove stylescombo from the list

System Settings > ckeditor > CSS styles set
custom:/assets/styles.js

Filesystem:

@mkay
mkay / create_project.sh
Last active September 6, 2015 12:38
Alfred Workflow for creating SASS/COMPASS projects
#!/bin/bash
#
# =================
# = What is this? =
# =================
# This is an Alfred (https://www.alfredapp.com/) workflow that will create a structured SASS/COMPASS project:
# (your mileage will vary and you will need to adjust the paths and actions)
# {query} = the string/name your entered in your Alfred dialog
#
# example.com (yes, I sort them by domain names)
<?php
/*
getTVLabel snippet for modx 2.3
Version:
------------------
v0.0.1 (2015-03-06 16:44)
Author:
------------------
@mkay
mkay / navbar.html
Created June 8, 2015 10:56
Bootstrap 3 navbar with MODX
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle collapsed" data-target="#navbar-collapse" data-toggle="collapse" type="button">
<span class="sr-only">Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
case 'en':
/* switch the context */
$modx->switchContext('en');
break;
default:
/* Set the default context here */
@mkay
mkay / debug
Created February 3, 2015 09:29
Bootstrap visual debug snippet
<!-- DEBUG -->
<div style="position: fixed; z-index:999">
<span class="label label-success hidden-xs hidden-sm hidden-md">LG</span>
<span class="label label-info hidden-xs hidden-sm hidden-lg">MD</span>
<span class="label label-primary hidden-xs hidden-md hidden-lg">SM</span>
<span class="label label-warning hidden-sm hidden-md hidden-lg">XS</span>
</div>
<!-- /DEBUG -->
@mkay
mkay / ckeditor.format_tags
Last active August 29, 2015 14:13
a basic, slim CKEditor config for MODX Revolution
p;h1;h2;h3;h4
@mkay
mkay / nginx.conf
Last active October 6, 2015 08:31
MODX Babel rewrites for nginx
server {
location / {
# MODX babel rewrites
rewrite ^/(en|de)/css(.*)$ /css$2 break;
rewrite ^/(en|de)/js(.*)$ /js$2 break;
rewrite ^/(en|de)/img(.*)$ /img$2 break;