Skip to content

Instantly share code, notes, and snippets.

[["NAME","GENC","POP","YR","AGE","SEX","genc standard countries and areas"],
["Botswana","BW","47254","2023","0","0","BW"],
["Botswana","BW","23927","2023","0","1","BW"],
["Botswana","BW","23327","2023","0","2","BW"],
["Botswana","BW","47164","2023","1","0","BW"],
["Botswana","BW","23872","2023","1","1","BW"],
["Botswana","BW","23292","2023","1","2","BW"],
["Botswana","BW","47133","2023","2","0","BW"],
["Botswana","BW","23852","2023","2","1","BW"],
["Botswana","BW","23281","2023","2","2","BW"],
@RossAllenBell
RossAllenBell / confluence_cloud.rb
Created May 9, 2022 13:39
Illustrative example of a sync job that matches a third party data structure.
class Sync::ConfluenceCloud
def run_job(job)
case job.task
when nil # Entry point, starts with queue_job (no params)
fetch_spaces.each do |space|
queue_job(task: 'crawl_space', space_id: space.id)
queue_job(task: 'index_document', document: space.to_json)
end
when 'crawl_space'
@RossAllenBell
RossAllenBell / saved-objects.ndjson
Last active January 21, 2021 06:15
An ndjson file containing saved objects for importing into Kibana. These saved objects represent an Elastic Workplace Search analytics dashboard and supporting objects.
{"attributes":{"description":"","expression":"kibana\n| kibana_context \n query=\"{\\\"language\\\":\\\"kuery\\\",\\\"query\\\":\\\"event.action : \\\\\\\"SearchMetrics.query\\\\\\\" \\\"}\" filters=\"[]\"\n| lens_merge_tables layerIds=\"c3174128-b2c6-4d1e-ae9d-2916a43a79c9\" \n tables={esaggs index=\"5c306300-eef3-11ea-891f-dbd815c23d04-ews-blog-2020\" metricsAtAllLevels=true partialRows=true includeFormatHints=true timeFields=\"@timestamp\" aggConfigs=\"[{\\\"id\\\":\\\"b171f1a0-ea9d-4937-9ab9-457ff4a8b593\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"useNormalizedEsInterval\\\":true,\\\"interval\\\":\\\"auto\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":0,\\\"extended_bounds\\\":{}}},{\\\"id\\\":\\\"c59dceda-f6be-46f4-804a-fe4c53613e4e\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"count\\\",\\\"schema\\\":\\\"metric\\\",\\\"params\\\":{}}]\" | lens_rename_columns idMap=\"{\\\"col-0-b171f1a0-ea9d-4937-9