This file contains hidden or 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
@charset "UTF-8"; | |
/* ♕β */ | |
body:before { content:'I vow to be with you\A'; | |
font-family:HelveticaNeue-CondensedBlack } | |
body { font:162%/2.62 HelveticaNeue; text-align:center; white-space:pre; | |
text-shadow:0 0 3px white; | |
background:white; color:#000; | |
margin:1em auto; padding:3em; | |
outline:1px dotted } | |
body:after { content:'♕♔♘'; padding:1em } |
This file contains hidden or 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
@charset "UTF-8"; | |
/* ♕β */ | |
body:before { content:'I vow\A'; | |
font-family:HelveticaNeue-CondensedBlack } | |
body { font:261%/1.6 HelveticaNeue; text-align:right; white-space:pre; | |
text-shadow:0 0 3px white; | |
background:white; color:#000; | |
max-width:11em; margin:1em auto; padding:.3em; | |
outline:1px dotted } | |
body:after { content:'♕' } |
This file contains hidden or 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
/* Triage */ | |
* { outline:1px solid #ddd; | |
font:1rem/1.6 sans-serif } |
This file contains hidden or 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
/* Triage */ | |
* { font:16px / 1 "Trebuchet MS"; | |
outline:1px solid #ddd; | |
font:1rem/1.6 sans-serif; | |
text-align:center; | |
padding:0 } | |
th,td { padding: 0 .4em } |
This file contains hidden or 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
/* | |
In an ontology, there are entities (nouns). | |
A specific ontology uses the actual entity nouns in a database schema, for example. | |
Business Ontology Tables: | |
For each executive, we use specific jargon; | |
for example, executive, product, technology, innovation, data, sales, marketing, operations. | |
Despite the varied jargon, there is one common language | |
that allows a company to align vision and values, | |
which could be ROI, LOE+cost, or any other form of value |
This file contains hidden or 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
/* | |
List all schemas, tables, and columns | |
*/ | |
create view inventory.index as | |
select nspname as _schema, | |
relname as _relname, | |
case | |
when relkind = 'r' then 'table' | |
when relkind = 'v' then 'view' | |
when relkind = 'm' then 'materialized view' |
This file contains hidden or 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
-- TEST ts_rank functions and (some) configs | |
select * | |
from (select trim(regexp_replace(txt, E'\\s*\n\\s*', ' ', 'g')) as txt, tsv | |
from (values ('my phone will not make or receive calls'), | |
($$ no matter what I do, my phone will not make or receive | |
calls even when I've asked nicely and it all goes well in the day | |
and then one day I did this other unrelated thing | |
and it still wouldn't work AT ALL so I asked Ben | |
who probably doesn't either but he has interesting answers $$), | |
('call my phone')) test_values (txt), |
This file contains hidden or 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
// Voice Driven Web Apps | |
//developer.chrome.com/blog/voice-driven-web-apps-introduction-to-the-web-speech-api | |
with (new webkitSpeechRecognition) | |
continuous = | |
interimResults = | |
true, | |
onstart = | |
onerror = |
This file contains hidden or 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 JSON tables | |
*/ | |
create or replace function flatten_json(data jsonb) | |
returns table ( | |
key text, | |
value jsonb, | |
json_type text) | |
as | |
$$ |
This file contains hidden or 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 an Object into a table with rows of columns including keys as headers | |
* @param object to flatten | |
*/ | |
function _asTable (object) { | |
return [].concat(object).reduce((list, item, i) => { | |
let labels = Object.keys(item) | |
if (!i && +labels[0] !== 0) list.push(labels) | |
list.push(labels.map(label => item[label])) | |
return list |
NewerOlder