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
type Overlap<T, U> = { [K in keyof T & keyof U]: U[K] }; | |
/** | |
* Return an object with only the properties existing on both objects, values equal to what's on the latter object. | |
*/ | |
export function pickOverlapping<T, U>(obj1: T, obj2: U): Overlap<T, U> { | |
const ret: any = {}; | |
for (const k in obj2) { | |
if (k in obj1) { | |
ret[k] = obj2[k]; |
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
<template> | |
<span class="item-cont"> | |
<transition-group name="rolodex"> | |
<span v-for="(item, index) of items" :key="index" v-show="index === i % items.length">{{ item }}</span> | |
</transition-group> | |
</span> | |
</template> | |
<style scoped> | |
.item-cont span { |
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
// ./flatten-amd-modules.js [input file path] [output file path] | |
var fs = require('fs'); | |
var esprima = require('esprima'); | |
var _ = require('lodash'); | |
let inputPath = process.argv[2]; | |
let outputPath = process.argv[3]; | |
const content = fs.readFileSync(inputPath, 'utf8'); | |
var output = []; | |
var replacements = []; |
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
#!/usr/bin/env python3 | |
''' | |
Update 10/4/2021 | |
* Download audio for the longest word in Spanish. | |
Update 9/22/2020 | |
* Allow looking up through multiple lang codes by priority order on Forvo (eg. es_LATAM, es) | |
* Strip nbsp; when looking up words on Forvo | |
Update 9/5/2020 |
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
Elastic Load Balancer, CloudFront and Let's Encrypt |
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 Messenger() { | |
} | |
Messenger.prototype.send = function(parcel) { | |
console.log("Handle auditing here"); | |
this._send(parcel); | |
}; | |
function TextMessenger(){ | |
this._send = function(parcel) { |