Skip to content

Instantly share code, notes, and snippets.

View Wattenberger's full-sized avatar
💖

Amelia Wattenberger Wattenberger

💖
View GitHub Profile
#!/bin/bash
# This script will download the contents of a GitHub repo
# and place them in a local directory.
#
# Usage:
# download-repo.sh <repo> <output-path> <nested-path> <branch-name>
#
# Example:
# download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets
@Wattenberger
Wattenberger / cloudSettings
Last active December 22, 2018 19:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-10-15T15:32:55.143Z","extensionVersion":"v3.1.2"}
@Wattenberger
Wattenberger / ref annotation - 6 month query for an author
Created December 18, 2017 15:58
ref annotation - 6 month query for an author
GET casterisk-1day-2017.06,casterisk-1day-2017.07,casterisk-1day-2017.08,casterisk-1day-2017.09,casterisk-1day-2017.10,casterisk-1day-2017.11,casterisk-1day-2017.12,casterisk-raws,casterisk-5min-2017.12.14,casterisk-5min-2017.12.16,casterisk-5min-2017.12.15,casterisk-5min-2017.12.17,casterisk-5min-2017.12.18,casterisk-5min-2017.12.13/url/_search?ignore_unavailable&timeout=240000&search_type=count&routing=arstechnica.com
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"apikey": "arstechnica.com"
@Wattenberger
Wattenberger / AMP shares query
Created November 27, 2017 22:23
AMP shares query
GET *-5min-*/_search?search_type=count
{
"aggs": {
"by_channel": {
"terms": {
"field": "channel.name",
"size": 10
},
"aggs": {
"by_apikey": {
@Wattenberger
Wattenberger / xpath-twin-finder.js
Last active February 6, 2018 18:40
Xpath twin finder
var mainTextStyles = [
"color: #fff",
"background: #5ba745",
"font-weight: bold",
"display: block",
].join(";")
var errorStyles = [
"color: #fff",
"background: #D05C4D",
"font-weight: bold",
@Wattenberger
Wattenberger / Refferer Categories
Created July 28, 2016 16:08
For Parsely/web#5241
Post info, w/ total page views:
GET casterisk-raws,casterisk-5min-2016.07.28/url,share/_search?ignore_unavailable&timeout=60000&search_type=count&routing=thedailybeast.com
{"query": {"filtered": {"filter": {"bool": {"must": [{"term": {"apikey": "thedailybeast.com"}}, {"range": {"_cache": true, "ts": {"from": "2016-07-27T03:00:00Z"}}}, {"term": {"_cache": false, "metas.canonical_url": "http://www.thedailybeast.com/articles/2016/07/26/prince-george-3-accused-of-being-a-f-king-d-khead-with-white-privilege.html"}}, {"range": {"_cache": false, "ts": {"to": "2016-07-28T15:00:30Z", "from": "2016-07-28T04:00:30Z"}}}, {"indices": {"indices": ["casterisk-5min-2016.07.28"], "filter": {"bool": {"must": [{"range": {"_cache": false, "ts": {"to": "2016-07-28T14:49:00"}}}, {"missing": {"field": "audience_segment_id"}}]}}}}, {"indices": {"indices": ["casterisk-raws"], "filter": {"bool": {"must": [{"range": {"_cache": false, "ts": {"from": "2016-07-28T14:50:00"}}}]}}}}]}}}}, "aggs": {"g0": {"terms": {"execution_hint": "map", "
<div class="threesixty" data-path="assets/img/src/gem{index}.JPG" data-count="61"></div>