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 express = require('express') | |
const resorts = require('./resort-names.json') | |
const { port = 3333, delay = 0 } = require('minimist')(process.argv) | |
const cors = require('cors') | |
const byName = name => resort => | |
name.toLowerCase() === resort.substr(0, name.length).toLowerCase() | |
const logger = (req, res, next) => { | |
console.log(`${req.method} request for ${req.url}`) |
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 isHappy = function(n) { | |
let set = new Set() | |
let temp = calculate(n) | |
if(set.has(temp)) return false | |
if (temp === 1) return true | |
set.add(temp) | |
return isHappy(temp) | |
} |
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
// let str = 'abc' | |
// const logSub = s => { | |
// let res = [] | |
// for (let i =0; i<s.length; i++) { | |
// for( let j=i+1; j<=s.length;j++) { | |
// res.push(str.slice(i,j)) | |
// } | |
// } |
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
" vi:syntax=vim | |
" base16-vim (https://github.com/chriskempson/base16-vim) | |
" by Chris Kempson (http://chriskempson.com) | |
" Ocean scheme by Chris Kempson (http://chriskempson.com) | |
" This enables the coresponding base16-shell script to run so that | |
" :colorscheme works in terminals supported by base16-shell scripts | |
" User must set this variable in .vimrc | |
" let g:base16_shell_path=base16-builder/output/shell/ |
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
set nosmoothscroll | |
set noautofocus | |
let scrollstep = 80 | |
set completeonopen | |
let typelinkhintsdelay = 10 | |
set typelinkhints | |
set sortlinkhints | |
let barposition = "bottom" | |
let hintcharacters = "hjkluuiopbnm,." | |
map h gT |
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 logo from './logo.svg' | |
import './App.css' | |
class App extends Component { | |
constructor() { | |
super() | |
this.state = { | |
value: 0 | |
} |
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> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
html { | |
height: 2000px; | |
} |
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 from "react" | |
// import Link from "gatsby-link" | |
// import get from "lodash/get" | |
// import Helmet from "react-helmet" | |
// import include from "underscore.string/include" | |
export default class BadCounter extends React.Component{ | |
constructor(props){ | |
super(props); |
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 = { | |
siteMetadata: { | |
title: "Gatsby Starter Blog", | |
author: "Kyle Mathews", | |
}, | |
plugins: [ | |
{ | |
resolve: `gatsby-source-filesystem`, | |
options: { | |
path: `${__dirname}/src/pages`, |
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 = { | |
siteMetadata: { | |
title: "Gatsby Starter Blog", | |
author: "Kyle Mathews", | |
}, | |
plugins: [ | |
{ | |
resolve: `gatsby-source-filesystem`, | |
options: { | |
path: `${__dirname}/src/pages`, |