Skip to content

Instantly share code, notes, and snippets.

@notacouch
notacouch / 'Citus_lib_for_Dates.js
Created May 26, 2021 04:13
Fork of Public Dates for TextExpander for international YYYY-MM-DD format
// This is a fork of the below to get YYYY-MM-DD date formats (to be on the same page with international usage/teams
// How to use:
// 1. Copy the public snippet "Past and Future Dates - Public"
// 2. Rename its 'lib_for_Dates Snippet to something else
// 3. Copy/paste this script's contents there
// 4. Update all the snippets' top line from:
// %snippet:'lib_for_Dates%
// to:
// %snippet:'Citus_lib_for_Dates%
// (where 'Citus_lib_for_Dates is what you renamed your snippet to)
@notacouch
notacouch / ResizeImagesToHalf.bas
Created September 21, 2020 16:34
MS Word Macro: Scale images to 50%
Sub ResizeImagesToHalf()
'
' Source: https://superuser.com/a/941255/172631
'
' .ScaleHeight below was getting the error:
' Run-time error '4693':
' This member cannot be accessed on a horizontal line.
'
' have to check the type of object it seems, source:
' https://answers.microsoft.com/en-us/msoffice/forum/all/fix-for-macro-to-add-borders-to-all-images-in-a/43b255dc-7cca-4df9-8721-1b6135ae6aca
@notacouch
notacouch / worldLow--canadia.json
Created November 15, 2018 00:30
amCharts v4 worldLow.json except US + CA combined
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notacouch
notacouch / canadia.json
Created November 15, 2018 00:19
Super canada... Canadia?!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notacouch
notacouch / us-ga.json
Created November 14, 2018 23:40
amCharts v4 US & CA geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notacouch
notacouch / log.js
Created November 4, 2018 04:55
life hack: console log function that auto-indents based on the depth of your call stack
function log(message) {
console.log(' '.repeat(new Error().stack.match(/\n/g).length - 2) + message);
}
@notacouch
notacouch / continentCountries.json
Created October 31, 2018 16:00
JSON mapping of Continent codes to their countries' ISO2 ids
{
"AF": {
"countries": [
"DZ",
"AO",
"BW",
"BI",
"CM",
"CV",
"CF",
@notacouch
notacouch / afghanist-provinces-districts--cities-demo.json
Created October 16, 2018 05:41
afghanistan provinces districts combo geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notacouch
notacouch / afghanist-districts--cities-demo.json
Created October 16, 2018 05:14
Afghanistan districts geojson with province iso2 id references
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notacouch
notacouch / afghanistan_provinces_geometry--cities-demo.json
Created October 16, 2018 05:12
afghanistan provinces geojson with iso2 ids
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.