Skip to content

Instantly share code, notes, and snippets.

@scottlepp
scottlepp / index.html
Last active August 29, 2015 14:20
Four Corners
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bushwick Community Map Intro</title>
<meta name="description" content="An introduction to the Bushwick Community Map">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/themes/css/cartodb.css">
<link rel="stylesheet" href="http://cartodb.github.io/odyssey.js/sandbox/css/slides.css">
@scottlepp
scottlepp / index.html
Created May 11, 2015 23:56
odyssey-generate example - cycling the four corners
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<div class="header-controller" ng-controller="HeaderCtrl as vm">
<div class="inner">
<h1 title="{{vm.buildRev}}"><a href="#/home{{vm.disp}}"><img class="logo" src="{{vm.logo}}" alt=""></a></h1>
<ng-include src="'src/search/search-input.html'"></ng-include>
<div id="hamburger" class="tablet_only" ng-show="vm.showNav"><a href="javascript:;" ng-class="vm.mobileToggleClass" ng-click="vm.toggleMobileNav()"><span class="sr-only">toggle mobile nav</span></a></div>
<ul role="navigation" ng-show="vm.showNav" ng-class="vm.navClass">
<li>
<a class="underline" href="mailto:info@voyagersearch.com?Subject=ODP Suggestion" target="_top">
<span class="fa fa-inbox" style="margin-right: 5px"></span><span class="txt"> Suggestions</span>
</a>
function flatten(source, key) {
let it, index = 0;
const flattened = {};
const delim = key !== undefined ? '.' : '';
key = key || '';
if (typeof source === 'string') {
flattened[key] = source;
return flattened;
}
@scottlepp
scottlepp / Scripts.js
Created December 15, 2017 15:40
Track Login Event
function getBrowser() {
"use strict";
var tem, ua = navigator.userAgent,
M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
return /trident/i.test(M[1]) ? (tem = /\brv[ :]+(\d+)/g.exec(ua) || [], "IE " + (tem[1] || "")) : "Chrome" === M[1] && (tem = ua.match(/\bOPR\/(\d+)/), null !== tem) ? "Opera " + tem[1] : (M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, "-?"], null !== (tem = ua.match(/version\/(\d+)/i)) && M.splice(1, 1, tem[1]), {
name: M[0],
version: M[1]
})
}
var vs;
group: movies
Actor = {
actor_id,movie_id
0000138,0120338
0000701,0120338
0000708,0120338
0000870,0120338
0000200,0120338
0000434,0076759
const http = require('http');
exports.handler = async (event, context) => {
// console.log('Received event:', JSON.stringify(event, null, 2));
return new Promise((resolve, reject) => {
try {
const options = {
host: 'ec2-18-191-89-162.us-east-2.compute.amazonaws.com',
path: '/api/repos/r1639420d605/index?delta=true&clear=false',
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="./src/main.ts"></script>
import Vue from 'vue';
import App from './app.vue';
new Vue({
el: '#app',
render: h => h(App)
});
<template>
<div id="app">
<header>foo</header>
<div>{{ bar }}</div>
</div>
</template>
<script lang="ts">
import App from './app-class';
export default App;