Skip to content

Instantly share code, notes, and snippets.

View seanwash's full-sized avatar
🏠
Working from home

Sean Washington seanwash

🏠
Working from home
View GitHub Profile
@seanwash
seanwash / catalog-feed.json
Created June 30, 2023 17:37
Klaviyo Catalog Feed Test
[{"id":1000000,"title":"Aberdine 2'2\" X 3' Rug, Aqua","description":" The simplistic yet compelling rugs from the Aberdine Collection effortlessly serve as the exemplar representation of modern decor. The meticulously woven construction of these pieces boasts durability and will provide natural charm into your decor space. Made with Polypropylene in Turkey, and has Medium Pile. Spot Clean Only, One Year Limited Warranty.\n\n <p>This part of the description isn't the description that came with the product. This is a way to to <i>rich text rendering<\/i> locally to <em>ensure<\/em> that we only support a <strong>select number<\/strong> of tags.<\/p>\n\n <br \/>\n\n We also need wrap each line in a <b>paragraph tag<\/b> to keep the styling consistent.\n\n <p>Here are some of that tags we intend to support:<\/p>\n <ul>\n <li>strong<\/li>\n <li>b<\/li>\n <li>em<\/li>\n <li>i<\/li>\n <li>br<\/li>\n <li>ul<\/li>\n <li>ol<\/li>\n <li>li<\/li>\n <\/ul>\n\n Anything outside from these w
@seanwash
seanwash / playbook--dates-datetimes-timezones.md
Last active November 15, 2022 16:40
Playbook / Dates, DateTimes & Timezones

Playbook / Dates, DateTimes & Timezones

Notes

  • Always store DateTimes in UTC.
  • Be aware of what values your tools default to.
  • Be aware of local configurations that might change those default values.
  • Be aware of services/locations that might use different timezone configs.
    • Server timezone
  • Database timezone
@seanwash
seanwash / playbook--writing-tests.md
Last active December 28, 2022 17:13
Playbook / Writing Tests

Playbook / Writing Tests

Remember, it's all about getting a good return on your investment where "return" is "confidence" and "investment" is "time." - Kent C. Dodds

People love debating what percentage of which type of tests to write, but it's a distraction. Nearly zero teams write expressive tests that establish clear boundaries, run quickly & reliably, and only fail for useful reasons. Focus on that instead. - Justin Searls

Write tests. Not too many. Mostly integration. - Guillermo Rauch

Notes

@seanwash
seanwash / playbook--pull-request-review.md
Last active March 12, 2023 15:11
Playbook / Pull Request Review

Playbook / Pull Request Review

In the general case, look at every line of code that you have been assigned to review. source

Often times the version control software will only show the changed lines. But it's important to read the lines before and after, or the whole file, to ensure you understand exactly what the change is doing. source

Notes

  • Don't try to rush a PR review if you’re busy or rushing. This is how details are missed and context is glossed over.
@seanwash
seanwash / check-package-version.mjs
Last active May 19, 2021 19:53
NPM Check Package Version
#!/usr/bin/env zx
// Don't output every command run.
$.verbose = false
let TARGET_BRANCH = await question('Which branch do you want to check? (develop) ')
TARGET_BRANCH = TARGET_BRANCH || 'develop'
const originalBranch = await $`git branch --show-current`
# Aliases
# ----------
alias ..="cd .."
alias ll="exa --long --header --git -a"
alias n="nvim"
alias c="cd ~/Code"
alias s="cd ~/Code/sidedoor"
alias config="cd ~/.config"
alias bluetooth="sudo pkill bluetoothd" # When bluetooth gets laggy, just kill it.
"""
""" https://github.com/JetBrains/ideavim#Files
""" https://gist.github.com/seanwash/b45169cbc5d90868f9f221191d67bec5
"""
"""
""" Plugins
"""
set surround
set commentary
@seanwash
seanwash / tasks.json
Last active March 28, 2020 22:43
VS Code Elixir Tasks
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
//
// Mix Tasks
//
{
"label": "mix.compile (force)",
@seanwash
seanwash / post.md
Created August 11, 2019 22:35 — forked from LostKobrakai/post.md
Using Laravel-Mix with Phoenix

Introduction

Laravel-Mix is "an elegant wrapper around Webpack for the 80% use case". It has nothing to do with Elixir's Mix and does not require Laravel to work!

Set up

Create a new phoenix application with mix phx.new. You may choose to add the --no-brunch flag to stop brunch from being intiailized, but I personally prefer leaving that in and replacing brunch so that the folder structure is set up for me.

$ mix phx.new demo

Install Laravel-Mix

@seanwash
seanwash / DiabloIII.ahk
Created January 3, 2019 04:30 — forked from NixonInnes/DiabloIII.ahk
Diablo III Autocast Autohotkey Script
; This is an AutoHotKey script designed to be used with Diablo III
; Pressing F1 will constantly activate skill 1, F2 will activate skill 2, F3 for 3, and F4 for 4
; The keys are togglable.
Thread, interrupt, 0
togF1 := 0
$F1::
togF1 := !togF1
if (togF1) {