Skip to content

Instantly share code, notes, and snippets.

View buddhamagnet's full-sized avatar

Dave Goodchild buddhamagnet

  • Matrix (South) Ltd
  • Reigate Surrey UK
View GitHub Profile
@buddhamagnet
buddhamagnet / cloudSettings
Last active September 9, 2020 15:58
vscode-settings
{"lastUpload":"2020-09-09T15:58:03.251Z","extensionVersion":"v3.4.3"}
@buddhamagnet
buddhamagnet / sort.js
Last active March 13, 2020 16:32
sort.js
const mappedConversionRulesets = [
{ ScoringEngine: 100, LineOfBusiness: 100 },
{ ScoringEngine: 10, LineOfBusiness: 10 },
{ ScoringEngine: 5, LineOfBusiness: 100 },
{ ScoringEngine: 5, LineOfBusiness: 5000 },
{ ScoringEngine: 5, LineOfBusiness: 100 },
{ ScoringEngine: 1000, LineOfBusiness: 100 }
];
const sortScoreConversionClever = mappedConversionRulesets.sort((a, b) =>
@buddhamagnet
buddhamagnet / CP-2013-query
Created March 25, 2019 09:46
CP-2013-query
http://mt-content.stage.s.aws.economist.com/graphiql?version=v1&query=%7B%0A%20%20canonical(ref%3A%20%22%2Fxref%2Feconomist%2Fnode%2F21748198%22)%20%7B%0A%20%20%20%20tegID%0A%20%20%20%20url%20%7B%0A%20%20%20%20%20%20canonical%0A%20%20%20%20%7D%0A%20%20%20%20text(format%3A%20%22json%22)%0A%20%20%7D%0A%7D%0A
@buddhamagnet
buddhamagnet / git-drop-submodule
Last active October 25, 2018 15:11
git-drop-submodule
git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
@buddhamagnet
buddhamagnet / docker-inception.md
Last active October 25, 2018 15:13
docker-inception

1. SETUP

FORK THE MOBY REPO

  • https://github.com/moby/moby

MAKE SURE YOUR USERNAME AND PASSWORD ARE CONFIGURED IN GIT

  • git config --local user.name "FirstName LastName"
  • git config --local user.email "email"
@buddhamagnet
buddhamagnet / Econ-elasticsearch-setup.md
Last active October 25, 2018 15:21
Econ-elasticsearch-setup
  • Run brew install elasticsearch
  • Navigate to cp-schema/search and run curl -H "Content-Type: application/json" -XPUT http://localhost:9200/t1 --data-binary @mappings.json
  • Send docs i.e. curl -H "Content-Type: application/json" -XPOST http://localhost:9200/t1/canonical -d '{"tegID": "12"}'
@buddhamagnet
buddhamagnet / CP-1620-atom-1.xml
Created June 8, 2018 09:38
CP-1620-atom-1.xml
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<subtitle>A subtitle.</subtitle>
<link href="http://example.org/feed/" rel="self" />
<link href="http://example.org/" />
<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
<updated>2003-12-13T18:30:02Z</updated>
@buddhamagnet
buddhamagnet / CP-1620-atom-0-3.xml
Created June 8, 2018 09:37
CP-1620-atom-0-3.xml
<?xml version="1.0"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#"
xmlns:g="http://base.google.com/ns/1.0">
<title>The name of your data feed</title>
<link href="http://www.example.com" rel="alternate" type="text/html" />
<modified>2005-10-11T18:30:02Z</modified>
<author>
<name>Google</name>
</author>
<id>tag:google.com,2005-10-15:/support/products</id>