Skip to content

Instantly share code, notes, and snippets.

View jonchretien's full-sized avatar
📷

Jon C. jonchretien

📷
View GitHub Profile
@jonchretien
jonchretien / vim-snippets.md
Last active August 29, 2015 14:13
VIM Snippets

Vim Snippets

Jump to line start

  • I ("Insert", editing mode)

Jump to line end

  • $ (non-editing mode)
  • A ("Append", editing mode)

Indent multiple lines

@jonchretien
jonchretien / _mixins-flexbox.less
Last active August 29, 2015 14:13
Flexbox Mixins
//
// Mixins: Flexbox
// --------------------------------------------------
.flex() {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
//
// Arrow Mixins
// --------------------------------------------------
.pct-arrow (@dir, @width, @color: @arrow-green) when (@dir = up) {
border-bottom: @width solid @color;
border-left: @width solid transparent;
border-right: @width solid transparent;
}
@jonchretien
jonchretien / Makefile
Created February 11, 2014 18:31
Copies local files to Dropbox folder.
# set aliases
DIST = \
~/Dropbox\ \(Company\)/Public/www
DIRS = \
css/ js/ less/
# copy files & directories (exluding lib)
copy:
cp *.html $(DIST)/project-name/
define([
'template',
], function(tmpl) {
'use strict';
/*!
* Tooltip Module
* Assumes use of JavaScript templating library.
*
id name priority who time status
T-024 Organisation list in directory MUST Joe 5 Complete
T-015 Make term Commissions customisable MUST Natasha 6 Complete
T-016 Comments popup on select rates MUST Mike 3 In Progress
T-0169 Upgrade Centos Box MUST Joe 2 In Progress
T-013 Search in Documents on selected folder MUST Natasha 6 In Progress
T-014 Separate Document system for LA and Legals MUST Joe 9 In Progress
T-017 Demo of Look and Feel of Documents front end MUST Natasha 5 In Progress
T-021 Fix error where forum filename is greater than 100chars MUST Mike 4 Not Started
T-025 Fix admin so structure of categories displayed MUST Mike 2.5 Complete
@jonchretien
jonchretien / Makefile
Created January 26, 2014 05:05 — forked from mbostock/.block
GENERATED_FILES = \
unemployment.tsv
.PHONY: all clean
all: $(GENERATED_FILES)
clean:
rm -rf -- $(GENERATED_FILES)
<div class="arrow-container arrow-up arrow-up-1">
<div class="arrow"></div>
</div>
<hr>
<div class="arrow-container arrow-down arrow-down-1">
<div class="arrow"></div>
</div>
@jonchretien
jonchretien / isMobile.js
Created January 6, 2014 15:02
Snippet from NYT redesign marketing page.
// Add HTML5 video play button for iphone/ipad/android
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
@jonchretien
jonchretien / Makefile
Created December 31, 2013 17:46 — forked from mbostock/.block
GENERATED_FILES = \
unemployment.tsv
.PHONY: all clean
all: $(GENERATED_FILES)
clean:
rm -rf -- $(GENERATED_FILES)