Skip to content

Instantly share code, notes, and snippets.

View jmartsch's full-sized avatar

Jens Martsch jmartsch

View GitHub Profile
@jmartsch
jmartsch / Gruntfile.coffee
Last active July 15, 2016 12:10
Gruntfile with browser-sync and assemble for static html files
# Generated on 2013-10-28 using generator-bootstrap-less 3.0.3
"use strict"
#lrSnippet = require("grunt-contrib-livereload/lib/utils").livereloadSnippet
#mountFolder = (connect, dir) ->
# connect.static require("path").resolve(dir)
# # Globbing
# for performance reasons we're only matching one level down:
# 'test/spec/{,*/}*.js'
@jmartsch
jmartsch / processwiresnippets.php
Created June 4, 2013 12:30
Common used code snippets for Processwire
// First child redirect
<?php if($page->numChildren) $session->redirect($page->child()->url);
// Redirect to specific page
$session->redirect($pages->get('/')->url);
// Create a menu, needs MarkupSimpleNavigation Plugin
<?php
$treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module
$rootPage = $pages->get("/ueber-uns/"); // if you want to overwrite start level for the menu, for example for breadcrumbs
@jmartsch
jmartsch / dabblet.css
Created March 20, 2013 00:02
Pure CSS Tooltips with unicode arrow and shadow
/*
* Pure CSS Tooltips with unicode arrow and shadow
*/
.ui-tooltip, .ui-tooltip-top, .ui-tooltip-right, .ui-tooltip-bottom, .ui-tooltip-left {
color:#ffffff;
cursor:normal;
display:-moz-inline-stack;
display:inline-block;
font-size:12px;
font-family:arial;