Instantly share code, notes, and snippets.

View california.json
[
{
"city": "Los Angeles",
"name": "Panda Express",
"title": "Behold: The Orange Chicken Burrito From Panda Express",
"latlong": "33.991521, -117.933127",
"video_id": 12771,
"bf_url": "",
"video_url": "https://www.facebook.com/buzzfeedbringme/videos/1514809721887184/",
"status": "Uploaded",
View buttons.css
.button {
cursor: pointer !important;
padding: 0 !important;
background-color: transparent !important;
background-image: none !important;
border: 1px solid transparent !important;
white-space: nowrap !important;
-webkit-appearance: none;
appearance: none;
-webkit-user-select: none;
View forms.css
.text-input,
.text-input--small,
.textarea,
.textarea--small,
.select,
.select--small {
font-family: inherit !important;
background: #fff !important;
font-size: 1rem !important;
line-height: 1.5rem !important;
View flex.css
.xs-flex {
display: flex !important; }
.xs-flex-order-1 {
order: 1 !important; }
.xs-flex-order-2 {
order: 2 !important; }
.xs-flex-order-3 {
View layout.css
.xs-overflow-hidden {
overflow: hidden !important; }
.xs-overflow-auto {
overflow: auto !important;
-webkit-overflow-scrolling: touch; }
.xs-overflow-scroll {
overflow: scroll !important;
-webkit-overflow-scrolling: touch; }
View couldBePalindromic.js
function couldBePalindromic(word) {
let letters = word.split('');
let matches = letters.map(letter => {
// How many sets of characters are multiples of 2
return letters.filter((l) => l == letter).length % 2 == 0
})
// Filter out the ones that aren't
.filter((bool) => bool == true)
View gist:fefaee82c2ac0e66fddd
'use strict';
var co = require('co'),
fs = require('co-fs'),
each = require('co-each');
var dive = function* (path) {
var items = yield fs.readdir(path);
View gist:4e3f5204497046fda26d
// This is a utility function that breaks a URL into an object
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri(d){for(var a=parseUri.options,d=a.parser[a.strictMode?"strict":"loose"].exec(d),c={},b=14;b--;)c[a.key[b]]=d[b]||"";c[a.q.name]={};c[a.key[12]].replace(a.q.parser,function(d,b,e){b&&(c[a.q.name][b]=e)});return c}
parseUri.options={strictMode:!1,key:"source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
function getCampaignMedium(landinguri, campcode, refuri){
/**********Campaign managem
View gist:1730c1a81819efdb273c
<head>
// If the user has a cookie don't render the critical css to the page
// Ensure it matches the md5 hash of our critical css so we can cache bust
- if cookies[:inline_css_cached] == critical_css_ref
// Instead get the styles from local storage
<script>
View gist:94a5e0b36521a95c2245
require ['jquery'], ($) ->
$(".js-colours .js-select").on "change", (e) ->
sortBy(@value)
$(".js-colours .styleguide-proximity__input").on "keyup", (event) ->
return resetProximity() if (!event.target.value)
event.keyCode is 13 and matchProximity()
sortBy = (comparator) ->
sections = document.querySelectorAll(".styleguide-block")