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
require("nixable", [ | |
"jquery", | |
"underscore" | |
], function( $, _ ) { | |
return { | |
nixable: function( closeTest, closeCall, context ) { | |
var self = this; | |
// Clear any outstanding nix call: |
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 parseCSV(csv, delimiter) { | |
delimiter = (delimiter || ","); | |
var pattern = new RegExp("(\\"+ delimiter +"|\\r?\\n|\\r|^)"+"(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|"+"([^\"\\"+ delimiter +"\\r\\n]*))", "gi"); | |
var quote = new RegExp("\"\"", "g"); | |
var data = [[]]; | |
var matches = null; | |
var val, d; | |
while (matches = pattern.exec(csv)) { |
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 ajax = (function( root ) { | |
function getRequest() { | |
if (root.ActiveXObject) return new ActiveXObject('Microsoft.XMLHTTP'); | |
else if (root.XMLHttpRequest) return new XMLHttpRequest(); | |
else return null; | |
} | |
return function(url, callback, post) { | |
post = post || ""; |
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 parseBindings(bindings, sorted) { | |
var attrs = []; | |
var token = ''; | |
bindings += ','; | |
for (var i = 0, len = bindings.length; i < len; i++) { | |
var c = bindings.charAt(i); | |
// Comma: chunk off tokens at list delimiter. | |
if (c == ',') { |
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
# Copy assignment into each student's folder | |
# Run this from the day's folder | |
# example: | |
# `~/Dev/wdi/homework/week_01/d_01` | |
# `assign` | |
assign(){ | |
# path to assignment. defaults to assignment folder. | |
assignment=${1:-"ASSIGNMENT_FILES/"} | |
# get list of directories |
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
[ | |
{ | |
"id": "a", | |
"parent": null | |
}, | |
{ | |
"id": "b", | |
"parent": "a" | |
}, | |
{ |
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
{ | |
"android_icon": "https://cdn0.vox-cdn.com/dev/uploads/chorus_asset/file/7045788/sandbox-www-data-ip-10-61-185-107_/sandbox_VergeFlavicon192.0.png", | |
"cache_version": "201", | |
"color_accent": "#e5127d", | |
"color_body": "#424242", | |
"color_body_bg": "#ffffff", | |
"color_body_link_underline": "currentColor", | |
"color_border_nav": "transparent", | |
"color_border_thick": "#EFEFF0", | |
"color_breaker_bg": "#EFEFF0", |
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
import Initializer from 'presto/initializer'; | |
var $loaded = $.Deferred(); | |
Initializer.registerComponent('site/font_loader', function(element, data) { | |
const STORAGE_NS = 'chorus-fonts-'+ data.version; | |
const FONTS_LOADED = ' fonts-loaded'; | |
const SUCCESS = function() {}; | |
var FontFaceObserver = require('./scripts/vendor/fontfaceobserver'); |
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
// THEME | |
// Get plain variable text: | |
theme.getVar('color_breaker_fg') | |
// Get rendered variable value: | |
theme.getVarValue('color_breaker_fg') | |
// Compile mapped field dependencies: | |
theme.getDependencyGraph() |
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
{ | |
"domain": "vox.com", | |
"cells": [ | |
{ | |
"slug": "UnisonNavListCell", | |
"bucket": "vox.com", | |
"data": { | |
"presto_component_data": "{\"trending_pinned\":false,\"communities_pinned\":false,\"nav_items\":[{\"title\":\"Politics\",\"url\":\"/policy-and-politics\",\"pinned\":false,\"all_link\":{\"title\":\"\",\"url\":\"\"},\"sub_items\":[],\"group_id\":30770},{\"title\":\"Explainers\",\"url\":\"/explainers\",\"pinned\":true,\"sub_items\":[],\"group_id\":24365},{\"title\":\"World\",\"url\":\"/world\",\"pinned\":false,\"all_link\":{\"title\":\"\",\"url\":\"\"},\"sub_items\":[],\"group_id\":30778},{\"title\":\"Culture\",\"url\":\"/culture\",\"pinned\":false,\"all_link\":{\"title\":\"\",\"url\":\"\"},\"sub_items\":[],\"group_id\":27608},{\"title\":\"Science & Health\",\"url\":\"/science-and-health\",\"pinned\":false,\"all_link\":{\"title\":\"\",\"url\":\"\"},\"sub_items\":[],\"group_id\":30772},{\"title\":\"Identities\",\"url\":\"/identities\",\"pinned\":false,\"all_link\":{\"title\":\"\",\"url\":\"\"},\"sub_items\":[],\"group_ |
OlderNewer