Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
💻 coding

John Cheesman john-cheesman

💭
💻 coding
View GitHub Profile
View .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 Jul 13, 2016
Number Field jQuery plugin
View number-field.js
(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;
View spacing.html
<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>
View property-format.scss
.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 Aug 29, 2015
Stylish Comment Blocks for Sass/LESS
View stylish-comment-blocks
//
// First Level Heading
// ---------------------------------------------------
//
// First Level Heading
// _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
// * * * * * * * * * * * * * * * * * * * * * * * * * *
// * First Level Heading *