Skip to content

Instantly share code, notes, and snippets.

View amundo's full-sized avatar
🗿
khagga

Patrick Hall amundo

🗿
khagga
  • Massachusetts
  • 08:31 (UTC -12:00)
View GitHub Profile
let orthographyInput = document.querySelector('#conversion-table')
let transcriptionInput = document.querySelector('#tokenize-input')
let transcriptionOutput = document.querySelector('#transcription-output')
let tokenize = transcription => {
return transcription
.trim()
.normalize("NFD")
.split(" ")
}
@amundo
amundo / createAmplifier.js
Created January 23, 2018 01:35 — forked from westc/createAmplifier.js
Function that can be used to amplify the volume of a media element (<audio> or <video>).
function amplifyMedia(mediaElem, multiplier) {
var context = new (window.AudioContext || window.webkitAudioContext),
result = {
context: context,
source: context.createMediaElementSource(mediaElem),
gain: context.createGain(),
media: mediaElem,
amplify: function(multiplier) { result.gain.gain.value = multiplier; },
getAmpLevel: function() { return result.gain.gain.value; }
};
@amundo
amundo / index.html
Created November 6, 2017 14:29
Media Objects
<div class="media">
<div class="img">
<img src="http://placehold.it/250x250" alt="Placeholder">
</div>
<h2 class="title">This is my title</h2>
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vehicula vitae ligula sit amet maximus. Nunc auctor neque ipsum, ac porttitor elit lobortis ac. Vivamus ultrices sodales tellus et aliquam. Pellentesque porta sit amet nulla vitae luctus.
Praesent quis risus id dolor venenatis condimentum.</p>
</div>
@amundo
amundo / index.html
Created September 20, 2017 17:29
paper text area
<div class="paper">
<div class="paper-content">
<textarea autofocus>Hello there !&#10;Here's a paper text area, feel free to type something ...</textarea>
</div>
</div>
<footer>
Orginal pen by <a href="https://codepen.io/MarcMalignan/" target="_blank">Marc Malignan</a> inspired by by Allan Peters
</footer>
@amundo
amundo / powerpoint.html
Last active January 13, 2017 17:34
the teensiest slide application in human history: try it at http://ruphus.com/slides.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>tiny slides</title>
</head>
<body>
<main>
@amundo
amundo / Trie.js
Created December 16, 2016 14:48 — forked from tpae/Trie.js
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
function TrieNode(key) {
// the "key" value will be the character in sequence
this.key = key;
@amundo
amundo / index.html
Created August 16, 2016 00:43 — forked from davo/index.html
Export CartoDB GeoJSON to TopoJSON.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@amundo
amundo / consonants.tsv
Last active February 5, 2016 23:50
IPA data
name voicing place manner letter sampa cv
aspirated voiceless alveolar plosive voiceless alveolar aspirated plosive t_h consonant
alveolar ejective voiceless alveolar ejective t_> consonant
alveolar ejective fricative voiceless alveolar ejective fricative s_> consonant
voiceless alveolar fricative voiceless alveolar fricative s s consonant
voiced alveolar fricative voiced alveolar fricative z z consonant
voiced alveolar implosive voiced alveolar implosive ɗ d_< consonant
labialized voiceless alveolar plosive voiced alveolar labialized plosive d_h consonant
labialized voiceless alveolar plosive voiceless alveolar labialized plosive t_h consonant
alveolar palatalized lateral approximant voiced alveolar palatalized lateral approximant l_j consonant
@amundo
amundo / README.md
Created September 26, 2015 20:41
path from numbers in d3

Playing with lines

Type two integers per line in the text area, and a line will be drawn on the right.

@amundo
amundo / cranium.js
Last active August 29, 2015 14:16 — forked from addyosmani/cranium.js
/* Cranium MVC
* A minimalist MVC implementation written for
* demonstration purposes at my workshops
* http://addyosmani.com
* Copyright (c) 2012 Addy Osmani; Licensed MIT */
var Cranium = Cranium || {};
// Set DOM selection utility