Skip to content

Instantly share code, notes, and snippets.

View john-cheesman's full-sized avatar
💭
💻 coding

John Cheesman john-cheesman

💭
💻 coding
View GitHub Profile
@john-cheesman
john-cheesman / .vimrc
Last active January 19, 2018 10:52
.vimrc
syntax on
set tabstop=4
set softtabstop=4
set expandtab
set number
set showcmd
set cursorline
set list
set clipboard=unnamedplus
autocmd FileType js,html,css,scss,json,vue,twig,php,cs,yml,lua,md,txt autocmd BufWritePre <buffer> %s/\s\+$//e
@john-cheesman
john-cheesman / number-field.js
Last active July 13, 2016 10:03
Number Field jQuery plugin
(function ($) {
var allowedKeys;
// Allow left, right, tab, backspace, delete and escape
allowedKeys = [8, 9, 37, 39, 46, 27];
$.fn.numberField = function () {
return this.each(function () {
$(this).on('keypress', function (event) {
var character;
@john-cheesman
john-cheesman / spacing.html
Last active August 29, 2015 14:08
HTML Spacing
<body>
<main class="content">
<header class="primary-header">
<nav class="primary-navigation">
<ul class="navigation-items">
<li class="navigation-item"><a href="#">Link</a></li>
<li class="navigation-item"><a href="#">Link</a></li>
<li class="navigation-item"><a href="#">Link</a></li>
</ul>
</nav>
@john-cheesman
john-cheesman / property-format.scss
Last active July 13, 2016 09:48
SASS Property Format
.parent-selector {
@extend %pattern; // Extend a placeholder
@extend %another-pattern; // Extend another placeholder
@include simple-mixin(); // Include a single line mixin
@include another-simple-mixin(); // Include another single line mixin
position: relative; // Positioning
top: 0;
bottom: 0;
@john-cheesman
john-cheesman / stylish-comment-blocks
Last active August 29, 2015 14:04
Stylish Comment Blocks for Sass/LESS
//
// First Level Heading
// ---------------------------------------------------
//
// First Level Heading
// _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
// * * * * * * * * * * * * * * * * * * * * * * * * * *
// * First Level Heading *