Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcus Herrmann marcus-herrmann

View GitHub Profile
@martinwolf
martinwolf / Preferences.sublime-settings
Last active Oct 8, 2015
Sublime Text 2 preferences
View Preferences.sublime-settings
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"file_exclude_patterns":
[
".DS_Store",
"._*"
],
"folder_exclude_patterns":
View PHP: Browser language detect
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); // Outputs "fr", "en", "es", etc...
@trilodge
trilodge / Gruntfile.js
Last active May 17, 2017
Grunt Setup of Stylelint linting SCSS-Files based on postcss-scss and postcss-reporter
View Gruntfile.js
var path = require('path');
var fs = require('fs');
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
@arjenblokzijl
arjenblokzijl / split-processwire-array.php
Last active May 16, 2018
Split WireArray/PageArray into chunks
View split-processwire-array.php
<?php
// Thanks to netcarver > https://processwire.com/talk/topic/7803-implement-array-chunk/?p=75573
$items = $pages->find('#whatever'); // Find your stuff
$parts = 3; // How many items should there be in 1 chunk?
$chunked = array_chunk($items->getArray(), $parts);
foreach ($chunked as $chunk) {
foreach ($chunk as $item) {
@yatil
yatil / wcag-ids.md
Created Jan 10, 2019
ID changes from WCAG 2.0 to 2.1
View wcag-ids.md
  • Perceivable
    • Text Alternatives

      • Non-text Content
        • WCAG 2.0 ID: text-equiv-all
        • WCAG 2.1 ID: non-text-content
    • Time-based Media

      • Audio-only and Video-only (Prerecorded)
        • WCAG 2.0 ID: media-equiv-av-only-alt
        • WCAG 2.1 ID: audio-only-and-video-only-prerecorded
@starckio
starckio / blueprints--contact.yml
Last active Feb 8, 2019 — forked from bastianallgeier/controllers--contact.php
Plain contactform example for Kirby 2
View blueprints--contact.yml
title: Contact
pages: false
fields:
title:
label: Page
type: text
width: 1/4
subtitle:
label: Title
type: text
@christophengelmayer
christophengelmayer / Contract Killer 3.md
Last active Mar 22, 2019 — forked from malarkey/Contract Killer 3.md
Contract Killer 3 - German Translation / Deutsche Übersetzung von Contract Killer 3, einer Vertragsvorlage für Webdesign und -development Tätigkeiten.
View Contract Killer 3.md

Contract Killer 3 deutsch

Letzte Änderung: 21.01.2013

Zwischen uns [Unser Firmenname] und Ihnen [Name des Kunden]

Zusammenfassung:

Wir tun immer unser Bestes um Ihre Bedürfnisse und Erwartungen zu erfüllen, jedoch ist es wichtig Dinge niederzuschreiben damit jeder weiß, was was ist, wer was und wann tuen soll und was passiert wenn etwas schief läuft. In diesem Vertrage werden Sie keine komplizierten, in Juristensprache verfassten Geschäftsbedingungen oder lange Passagen von unleserlichem Text finden.

@soffes
soffes / perferences.json
Created Aug 22, 2012
My Sublime Text 2 config
View perferences.json
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],
View jQuery HTML5 placeholder fix.js
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);