Skip to content

Instantly share code, notes, and snippets.

View dwnoble's full-sized avatar

Dan Noble dwnoble

View GitHub Profile
### Added Nodes ###
Node: dcid:who/E_Group
Node: dcid:who/EMFLIMITELECTRIC.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFLOW
Node: dcid:who/EMFLIMITELECTRIC.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFSTATIC
Node: dcid:who/EMFLIMITELECTRIC.EMFEXPOSED--EMFWORKER__EMFFREQUENCY--EMFSTATIC
Node: dcid:who/EMFLIMITELECTRICLF.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFLOW
Node: dcid:who/EMFLIMITELECTRICLF.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFSTATIC
Node: dcid:who/EMFLIMITELECTRICLF.EMFEXPOSED--EMFWORKER__EMFFREQUENCY--EMFLOW
Node: dcid:who/EMFLIMITELECTRICRF.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFRADIO__EMFRADIOBAND--EMFFREQ0900
Node: dcid:who/EMFLIMITELECTRICRF.EMFEXPOSED--EMFPUBLIC__EMFFREQUENCY--EMFRADIO__EMFRADIOBAND--EMFFREQ1800
@dwnoble
dwnoble / index.html
Last active September 21, 2023 17:53
<html>
<head>
<!-- https://gist.github.com/dwnoble/719f5d71c2823ac3e58f504cb6ceccd3 -->
<script src="https://datacommons.org/datacommons.js"></script>
<style>
#styled-map {
--dc-headings-font-family: monospace;
}
#styled-map::part(container) {
border-radius: 10px;
@dwnoble
dwnoble / index.html
Last active September 21, 2023 17:54
<!DOCTYPE html>
<html>
<head>
<!-- https://gist.github.com/dwnoble/9e3ac88e162248f849dd276ff5895ad0 -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.cdnfonts.com/css/museo-sans-rounded"
rel="stylesheet"
/>
@dwnoble
dwnoble / index.html
Last active September 21, 2023 17:54
<html>
<head>
<!-- https://gist.github.com/dwnoble/822ce6018bb41113c866d703760c1def -->
<script src="https://datacommons.org/datacommons.js"></script>
<style>
/**
* Example component styling using shadow part identifiers
*/
#styled-bar::part(x-axis) {
stroke: #111a1b;
@dwnoble
dwnoble / index.html
Last active September 21, 2023 17:54
<html>
<head>
<!-- https://gist.github.com/dwnoble/c0c88276739f4f6061807cc943937a14 -->
<script src="https://datacommons.org/datacommons.js"></script>
</head>
<body>
<datacommons-line
header="US Population Over Time"
place="country/USA"
variables="Count_Person"
@dwnoble
dwnoble / gist:4666439
Last active December 21, 2015 11:06
elasticsearch weird behavior when a document's _id is set to an object
# When indexing a document, we can specify an _id in the source to get ES to store it
curl -XDELETE 'http://localhost:9200/testindex/'
curl -XPOST 'http://localhost:9200/testindex/people/50f626ce173183f5f2d9dec0?refresh=true' -d '{
"_id" : "50f626ce173183f5f2d9dec0",
"person" : {
"age" : 25,
"name" : "Bob"
}
}'
# And we can now find this document with say, a range query:
@dwnoble
dwnoble / gist:1894791
Created February 23, 2012 20:01
Regex for removing all lines in a file that do not contain Spanish characters
s/^[^áÁéÉíÍóÓúÚñÑüÜ]*$//g
@dwnoble
dwnoble / replace_accented_characters.sh
Created February 23, 2012 19:05
Replace characters that have Spanish accents with non accented characters
#!/bin/sh
# Note: input should end with a newline
LINES=''
while read LINE; do
LINES="${LINES}\n${LINE}"
done
echo $LINES | sed 's/á/a/g' | sed 's/Á/A/g' | sed 's/é/e/g' | sed 's/É/E/g' | sed 's/í/i/g' | sed 's/Í/I/g' | sed 's/ó/o/g' | sed 's/Ó/O/g' | sed 's/ú/u/g' | sed 's/Ú/U/g' | sed 's/ñ/n/g' | sed 's/Ñ/N/g' | sed 's/ü/u/g' | sed 's/Ü/U/g'