Skip to content

Instantly share code, notes, and snippets.

https://gist.github.com/clarkgrubb/d8e6a532e12a08965d7072dec69e81ca
api_content_launcher_1 | Traceback (most recent call last):
api_content_launcher_1 | File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
api_content_launcher_1 | (self.host, self.port), self.timeout, **extra_kw)
api_content_launcher_1 | File "/usr/local/lib/python3.5/site-packages/urllib3/util/connection.py", line 60, in create_connection
api_content_launcher_1 | for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
api_content_launcher_1 | File "/usr/local/lib/python3.5/socket.py", line 732, in getaddrinfo
api_content_launcher_1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
api_content_launcher_1 | socket.gaierror: [Errno -2] Name or service not known
api_content_launcher_1 |
api_content_launcher_1 | During handling of the above exception, another exception occurred:
@clarkgrubb
clarkgrubb / json-diff
Created May 9, 2018 01:35
tool for comparing two json documents
#!/usr/bin/env bash
set -eu -o pipefail
if [ "$#" -lt 2 ]
then
echo "USAGE: json-diff [DIFF_OPTIONS] PATH1 PATH2" 1>&2
exit 2
fi
#!/usr/bin/env bash
set -eu -o pipefail
if [ "$#" -lt 2 ]
then
echo "USAGE: json-diff [DIFF_OPTIONS] PATH1 PATH2" 1>&2
exit 2
fi
@clarkgrubb
clarkgrubb / gist:d0faa55f5fd1ac66931192d9a7c211a4
Created May 9, 2018 01:30
http://localhost:1337/get?siteId=howstuffworks&contentType=galleries
{
"ok": true,
"errorMessage": "",
"page": 1,
"size": 100,
"count": 16,
"data": [
{
"id": "d61da97c-0639-4898-83f4-90cfbfd75aff",
"siteId": "howstuffworks",
@clarkgrubb
clarkgrubb / gist:2660204cb2159b84353fe6f9d3349977
Created May 9, 2018 01:28
http://localhost:1337/get?siteId=zoo&contentType=galleries
{
"ok": true,
"errorMessage": "",
"page": 1,
"size": 100,
"count": 16,
"data": [
{
"id": "d61da97c-0639-4898-83f4-90cfbfd75aff",
"siteId": "zoo",
@clarkgrubb
clarkgrubb / gist:60a7a6426d6b35197e6aa8134c784859
Created May 9, 2018 01:27
http://localhost:1337/get?siteId=zoo&contentType=galleries
{"ok":true,"errorMessage":"","page":1,"size":100,"count":16,"data":[{"id":"d61da97c-0639-4898-83f4-90cfbfd75aff","siteId":"zoo","contentType":"galleries","fullContentType":"gallery.slideshow.normal","length":"1","title":"awdss","url":"/awdss","campaignDomain":"","heroImage":"","mobileHeroImage":"","siteUrl":"http://zoo.com/gallery/awdss","branding":[{"name":"zoo","url":"http://zoo.com/gallery/awdss"}],"author":"dasd","editor":"ad","verticalId":"","verticalName":"","keywords":["Books","Business"],"parentId":"","language":"English","cloneType":"","cloneName":"","publishedDate":"2016-11-10","lastModifiedDate":"2016-11-10T18:22:50-08:00"},{"id":"41541715-1c3e-4923-859e-a064efb9be25","siteId":"zoo","contentType":"galleries","fullContentType":"gallery.card.normal","length":"16","title":"16 Things You Never Would’ve Guessed About 'The Walking Dead'","url":"/10-things-you-never-wouldve-guessed-the-walking-dead","campaignDomain":"","heroImage":"","mobileHeroImage":"","siteUrl":"http://zoo.com/gallery/10-things-you-nev
http://http://zoo.com/simpleArticle/7-ways-credit-cards-can-you-money/?om_bs=dJlY28OBYY0hJ5zzwYGEzcxU-47pZ3Eavx0zndHzt0PmfgB7gomPcGW1OMq5GDWRUSzfAZ3QoJducX-9cpxbzNYfMH-F7ko_QrBL8YBLZriBCBid5AIijdC6fXakt0xqP5bmXIwGmTMkSmRzSpBVtTL2AS6GQliYDu9RlKSe3FqvuY4d2dEfqT-4MJELSq6AWqYhB_och-OnHV4
http://http://zoo.com/simpleArticle/7-ways-credit-cards-can-you-money/?om_bs=T2RAamsZfAEkzmnS9LnkDjceQ95uwYPmAhBTRF52VxX_sUwJRfzN5aixC1CIMVh638oAJ8f9_nEf3p5VV-VHJmuuRSJOeinALK2KfJmHHFfezWNC7Y4uyZCz5OLt-M_XYs7RWObI919rfiLi6FFo0s02Au7-X6YOeV4jDczEzdzDpeAgEPfigANa6ytWl_LujojI7lgkdui2fVk
http://electronics.howstuffworks.com/mmorpg-quiz.htm
http://silverislandtravel.com/
http://nation.com/?om_bs=TeuCMyeQpnag0RZI8MC7inYftLAZCHevTEOirUvTPUjRZgoMHrY2l5tnJA1pOqfbCiKPzBwJTlMYC9C6kuFW7gmtVOByx1JYuQns5XuHVVZSP_tWY_PZhDOCZqINfM_dopvCYQDWJPR2c01PgaAf7QcARsKVmGs9rpPFUg1U5Fg=&search_track_url=%2F%2Fwww.facebook.com%2Ftr%3Fid%3D228548517496016%26ev%3Da35cd7f0168f4223bb5068bcf16ff3d3%26noscript%3D1
http://entertainment.howstuffworks.com/famous-fir
for network in facebook gemini outbrain taboola
do
curl 'http://signals-es-access-1.test.inspcloud.com:9200/signals_${network}_ads/defaultSettings/_search' \
-d '{"query":{"match_all":{}}}' \
| ./make_convenient.py \
| jq . \
> signals_${network}_ads/defaultSettings.json
done
cat ~/make_convenient.py
$ cat zoo.quizzes.json | jq -r '.quiz.metadata.quizLink' | sed $'s/./&\\\n/g' | awk '{cnt[$0] += 1} END {for (i in cnt) print cnt[i], i}' | sort -nr
22105 -
13265 e
9753 o
9501 a
7662 t
7502 r
7352 i
7274 h
6593 s