Skip to content

Instantly share code, notes, and snippets.


CJ Harries thecjharries

View GitHub Profile
View vscode-settings.json
"": "/bin/zsh",
"terminal.external.linuxExec": "/usr/bin/terminator",
"terminal.integrated.fontFamily": "DroidSansMono Nerd Font",
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"markdown.extension.toc.omittedFromToc": {
// Use a path relative to your workspace.
"": [
"# *"
View .editorconfig
root = true
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
thecjharries /
Created Aug 12, 2020
Using terragrunt to manage GCP remote state with a JSON creds file

Terragrunt provides a remote state example for S3. I started this morning by adapting that to GCS.

# root/terragrunt.hcl
remote_state {
  backend = "gcs"
  generate = {
    path      = ""
    if_exists = "overwrite_terragrunt"
thecjharries / images.xml
Created Jul 12, 2018 — forked from kitwalker12/images.xml
Amazon MWS Beauty Product Feed XML Sample
View images.xml
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
thecjharries / !
Created May 29, 2018
A quick tutorial on how to use curl to set up a new repo
View !


git can automatically register scripts that are in your $PATH that begin with git-. This will set up and download the included scripts.

Note: you'll have to replace [gist_id with the ID in the URL for now. I haven't updated this yet with the published URL.

$ mkdir -p ~/bin
$ export PATH=$HOME/bin:$PATH
$ curl -fLo ~/bin/git-github-create-pat[gist_id]/raw/
thecjharries /
Created Feb 11, 2018
Quick demo for an SO thread
from tkinter import Button, Tk
except ImportError:
from Tkinter import Button, Tk
MASTER.wm_title("Color Demo")
MASTER.attributes('-type', 'utility')
thecjharries / standard-vs-arrow.js
Last active May 14, 2017
This is a simple working demo to illustrate the difference between the scopes of function(){} and ()=>{}
View standard-vs-arrow.js
// Scopes: {title (for checkInnerScopeAgainstCallingScope), name, scope}
function determineObjectScope(inner, outer) {
console.log(` ${ === 'global' ? '' : 'nested '}${} this === ${} this: ${inner.scope === outer.scope}`);
function functionFactory(calling) {
if ( && calling.scope) {
return (function() {
return function() {
thecjharries /
Last active Apr 26, 2017
# I sourced most of this stuff (i.e. both the commands but sed instead of leafpad) from
# Gotta be using KDE 4 because this probaably doesn't work on other versions
# Image needs to be in Desktop because I'm too lazy to make it dynamic
# TODO: make this a help option
# usage: