Skip to content

Instantly share code, notes, and snippets.

View dvdsmpsn's full-sized avatar

David Simpson dvdsmpsn

View GitHub Profile
Name SMILES
Aspirin O=C(C)Oc1ccccc1C(=O)O
Acetylene C#C
Adenosine triphosphate O=P(O)(O)OP(=O)(O)OP(=O)(O)OC[C@H]3O[C@@H](n2cnc1c(ncnc12)N)[C@H](O)[C@@H]3O
Ampicillin CC1(C(N2C(S1)C(C2=O)NC(=O)C(C3=CC=CC=C3)N)C(=O)O)C
Chemistry of ascorbic acid C([C@@H]([C@@H]1C(=C(C(=O)O1)O)O)O)O
Chemistry of ascorbic acid OC=1C(OC(=O)C=1O)[C@@H](O)CO
Amphetamine NC(C)Cc1ccccc1
Aspartame O=C(O)C[C@H](N)C(=O)N[C@H](C(=O)OC)Cc1ccccc1
Amoxicillin O=C(O)[C@@H]2N3C(=O)[C@@H](NC(=O)[C@@H](c1ccc(O)cc1)N)[C@H]3SC2(C)C
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 14 columns, instead of 11 in line 7.
Region,Country,Item Type,Sales Channel,Order Priority,Order Date,Order ID,Ship Date,Units Sold,Unit Price,Unit Cost,Total Revenue,Total Cost,Total Profit
Australia and Oceania,Tuvalu,Baby Food,Offline,H,5/28/2010,669165933,6/27/2010,9925,255.28,159.42,2533654.00,1582243.50,951410.50
Central America and the Caribbean,Grenada,Cereal,Online,C,8/22/2012,963881480,9/15/2012,2804,205.70,117.11,576782.80,328376.44,248406.36
Europe,Russia,Office Supplies,Offline,L,5/2/2014,341417157,5/8/2014,1779,651.21,524.96,1158502.59,933903.84,224598.75
Sub-Saharan Africa,Sao Tome and Principe,Fruits,Online,C,6/20/2014,514321792,7/5/2014,8102,9.33,6.92,75591.66,56065.84,19525.82
Sub-Saharan Africa,Rwanda,Office Supplies,Offline,L,2/1/2013,115456712,2/6/2013,5062,651.21,524.96,3296425.02,2657347.52,639077.50
Australia and Oceania,Solomon Islands,Baby Food,Online,C,2/4/2015,547995746,2/21/2015,2974,255.28,159.42,759202.72,474115.08,285087.64
Sub-Saharan Africa,Angola,Household,Offline,M,4/23/2011,135425221,4/27/2011,4187,668.27,502
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 14 columns, instead of 3 in line 8.
Region,Country,Item Type,Sales Channel,Order Priority,Order Date,Order ID,Ship Date,Units Sold,Unit Price,Unit Cost,Total Revenue,Total Cost,Total Profit
Middle East and North Africa,Libya,Cosmetics,Offline,M,10/18/2014,686800706,10/31/2014,8446,437.20,263.33,3692591.20,2224085.18,1468506.02
North America,Canada,Vegetables,Online,M,11/7/2011,185941302,12/8/2011,3018,154.06,90.93,464953.08,274426.74,190526.34
Middle East and North Africa,Libya,Baby Food,Offline,C,10/31/2016,246222341,12/9/2016,1517,255.28,159.42,387259.76,241840.14,145419.62
Asia,Japan,Cereal,Offline,C,4/10/2010,161442649,5/12/2010,3322,205.70,117.11,683335.40,389039.42,294295.98
Sub-Saharan Africa,Chad,Fruits,Offline,H,8/16/2011,645713555,8/31/2011,9845,9.33,6.92,91853.85,68127.40,23726.45
Europe,Armenia,Cereal,Online,H,11/24/2014,683458888,12/28/2014,9528,205.70,117.11,1959909.60,1115824.08,844085.52
Sub-Saharan Africa,Eritrea,Cereal,Online,H,3/4/2015,679414975,4/17/2015,2844,205.70,117.11,585010.80,333060.84,251949.96
Europe,Montenegro,Clot
@dvdsmpsn
dvdsmpsn / README.md
Last active May 23, 2023 18:49
GatsbyJS compatible IndexNow script for NodeJS

GatsbyJs compatible IndexNow script for NodeJs

Assumes that your deploy script will deploy a fresh sitemap.xml file, so it can get the remote file, parse it and post the results to Bing.

  • Go to https://www.bing.com/indexnow and generate an API Key.
  • Save the key file to https://www.yourdomain.com/*************.txt
  • Add index-now.mjs at scripts/index-now.mjs & npm install -dev cross-fetch xml-js
  • Update host, key and sitemapUrl in scripts/index-now.mjs
  • Add the seo:index-now block to your package.json
  • Add && npm run seo:index-now at the end of your deploy block
// turns `<h1...h4>Hello world</h1..h4>` into `<h1...h4>Hell🎃 w🎃rld</h1..h4>`
// on halloween only
const now = new Date();
const isHalloween = now.getMonth() === 9 && now.getDate() === 31;
if (isHalloween) {
const h = document.querySelectorAll('h1,h2,h3,h4');
h.forEach(i => i.innerHTML = i.innerHTML.replaceAll('o', '🎃'))
}
console.log('hello monday.com');
## Macro title: user-pictures-for-group
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: David Simpson <[email protected]>
## Date created: 2014-06-18
## Installed by: *****My Name*****
##
## Users Pictures for Group - Confluence User Macro
@dvdsmpsn
dvdsmpsn / .block
Last active June 13, 2020 14:54
Changing styles and colours with CSS custom properties (CSS variables)
license: apache-2.0
@dvdsmpsn
dvdsmpsn / keybase.md
Created July 25, 2019 14:52
keybase.md

Keybase proof

I hereby claim:

  • I am dvdsmpsn on github.
  • I am dvdsmpsn (https://keybase.io/dvdsmpsn) on keybase.
  • I have a public key ASBUtoJ-78m3GmB_rjFlUmsY9IWMq-ALXtSERL4lpqQIHgo

To claim this, I am signing this object: