This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.s status | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.new checkout -b | |
git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert contentful CLI export to markdown with node | |
const slugify = require('slugify') | |
const fs = require('fs') | |
const data = require('./data.json') | |
const sanatiseFields = fields => { | |
return Object.keys(fields).reduce((prev, next) => { | |
prev[next] = fields[next]['en-US'] ? fields[next]['en-US'] : fields[next] | |
return prev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
rules: { | |
'at-rule-empty-line-before': [ | |
'always', | |
{ | |
except: [ | |
'blockless-after-same-name-blockless', | |
'blockless-after-blockless', | |
'first-nested' | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
valid_url = new RegExp( | |
"^" + | |
"(?:" + | |
// $1 protocol | |
"([a-z\\u00a1-\\uffff0-9]+-?)?" + | |
"(?:(?:\\:)?//)"+ | |
// $2 username:password | |
"(?:((?:\\S*)(?::\\S*)?)@)?" + | |
// $3 Hostname | |
"("+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To add more icons just copy these three lines */ | |
.icon-tomato, | |
.icon-left-tomato:before, | |
.icon-right-tomato:after{ | |
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/131442/tomato.svg); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document) | |
Node.prototype.on = window.on = function (name, delegate, fn) { | |
var f | |
var target = this, match = false | |
var matches = this.matchesSelector || this.mozMatchesSelector || this.webkitMatchesSelector || this.oMatchesSelector || (function (name) { | |
$(name).forEach(function (elm) { | |
if (elm === target){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Highlight words in html - v0.0.1 - 2015-04-29 | |
* http://madebymike.com.au | |
* Copyright (c) 2015 Mike Riethmuller; Licensed MIT | |
*/ | |
/* | |
* It turns out that annotating a phrase within HTML is exceptionally hard. I've done it so you don't have to. | |
* The function accepts a phrase (string), HTML (string), and optionally a classname (string) | |
* It returns the same HTML with <mark> elements surrounding the phrase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var src = 'data:image/jpg;base64,/9j/4Q4kRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAiAAAAcgEyAAIAAAAUAAAAlIdpAAQAAAABAAAAqAAAANQACvyAAAAnEAAK/IAAACcQQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpADIwMTQ6MTI6MjAgMTE6NDk6MzIAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAjCgAwAEAAAAAQAAATsAAAAAAAAABgEDAAMAAAABAAYAAAEaAAUAAAABAAABIgEbAAUAAAABAAABKgEoAAMAAAABAAIAAAIBAAQAAAABAAABMgICAAQAAAABAAAM6gAAAAAAAABIAAAAAQAAAEgAAAAB/9j/7QAMQWRvYmVfQ00AAf/uAA5BZG9iZQBkgAAAAAH/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwMDAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwMDAwMEREMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAFoAoAMBIgACEQEDEQH/3QAEAAr/xAE/AAABBQEBAQEBAQAAAAAAAAADAAECBAUGBwgJCgsBAAEFAQEBAQEBAAAAAAAAAAEAAgMEBQYHCAkKCxAAAQQBAwIEAgUHBggFAwwzAQACEQMEIRIxBUFRYRMicYEyBhSRobFCIyQVUsFiMzRygtFDByWSU/Dh8WNzNRaisoMmRJNUZEXCo3Q2F9JV4mXys4TD03Xj80YnlKSFtJXE1OT0pbXF1eX1VmZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3EQACAgECBAQDBAUGBwcGBTUBAAIRAyExEgRBUWFxIhMFMoGRFKGxQiP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select> | |
<option value="NSW">New South Wales</option> | |
<option value="VIC">Victoria</option> | |
<option value="QLD">Queensland</option> | |
<option value="WA">Western Australia</option> | |
<option value="SA">South Australia</option> | |
<option value="TAS">Tasmania</option> | |
<option value="ACT">Australian Capital Territory</option> | |
<option value="NT">Northern Territory</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.mergeObjects = function(objects, merge_cb) { | |
var options, name, src, copy, copyIsArray, clone, | |
target = objects[0] || {}, | |
i = 1, | |
length = objects.length; | |
// Handle case when target is a string or something | |
if ( typeof target !== "object" && !$.isFunction(target) ) { | |
target = {}; |
NewerOlder