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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>One Minute Map</title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="https://www.nextzen.org/js/nextzen.css"> | |
<script src="https://www.nextzen.org/js/nextzen.min.js"></script> | |
<style> | |
#map { | |
height: 100%; |
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
# Given an array of people objects (where each person has a name and a number of pizza slices they’re hungry for) and a number for the number of slices that the pizza can be sliced into, return the number of pizzas you need to buy. | |
# | |
# Example: | |
# | |
# $ arr = [{ name: Joe, num: 9 }, { name: Cami, num: 3 }, { name: Cassidy, num: 4 }] | |
# $ gimmePizza(arr, 8) | |
# $ 2 // 16 slices needed, pizzas can be sliced into 8 pieces, so 2 pizzas should be ordered | |
def gimmePizza(people, slices_per_pizza) | |
slices = people.map{|o| o.fetch(:num)}.sum |
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
# Given an array of random integers, move all the zeros in the array | |
# to the end of the array. Try to keep this in O(n) time (or better)! | |
# | |
# Example: | |
# | |
# $ moveZeros([1, 2, 0, 1, 0, 0, 3, 6]) | |
# $ [1, 2, 1, 3, 6, 0, 0, 0] | |
# This is prettier! :) | |
def moveZeros(nums) |
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
<!-- | |
Various minor spacing adjustments | |
--> | |
<img class="img-responsive wp-image-2500 aligncenter" src="http://jayklumber.staging.wpengine.com/wp-content/uploads/2018/01/LP_HeaderImage-600x152.jpg" alt="" width="699" height="177" /> | |
<h2 class="p1"><span class="s1">Design your new kitchen with our experts</span></h2> | |
<div class="row"> | |
<div class="col-lg-7"> | |
<p>If you’ve been waiting to start your kitchen remodel, these package deals make this the perfect time to get started!</p> |
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
const secretArchivesLock = (lock, actions) => | |
optimizeActions([...actions]).reduce((lock, direction) => move(lock, direction), lock) | |
const move = (lock, direction) => { | |
return { | |
'L': moveLeft(lock), | |
'R': moveRight(lock), | |
'U': moveUp(lock), | |
'D': moveDown(lock) | |
}[direction] || lock |
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 React, { Component } from 'react' | |
import { | |
AppRegistry, | |
Button, | |
Text, | |
TextInput, | |
View, | |
} from 'react-native' | |
import { StackNavigator } from 'react-navigation' | |
import validator from 'email-validator' |
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 NOTIFY_RULES = { | |
'South Utica': '[email protected], [email protected]', | |
'New Hartford': '' | |
}; | |
var NOTIFY_CONDITION = 'Most convenient branch for us to meet'; | |
var NOTIFY_URL = 'https://zapier.com/hooks/catch/3c89f1/'; | |
//var NOTIFY_URL = 'http://requestb.in/1hjdom11'; // TEST | |
var payload = {}; | |
for (var prop in input) { |
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
{% comment %} | |
Responsive product images with srcset. | |
{% endcomment %} | |
{% assign default_default_size = "medium" %} | |
{% assign default_sizes = "100vw" %} | |
{% assign default_image = product.featured_image %} | |
{% if default_size == nil %}{% assign default_size = default_default_size %}{% endif %} | |
{% if sizes == nil %}{% assign sizes = default_sizes %}{% endif %} |
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
html, | |
body { | |
margin: 0; | |
background-color: transparent; | |
} | |
#container { | |
width: auto; | |
box-shadow: none; | |
border: none; |
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
// Adapted from the super-awesome technique described here: | |
// http://www.acusti.ca/blog/2014/11/28/towards-a-more-perfect-link-underline/ | |
@mixin custom-underline($color, $underline-color, $hover-color, $hover-underline-color, $bg-color) { | |
color: $color; | |
text-decoration: none; | |
// Underline via gradient background | |
background-image: linear-gradient($underline-color 0%, $underline-color 100%); | |
background-repeat: repeat-x; | |
background-size: 1px 1px; |
NewerOlder