Skip to content

Instantly share code, notes, and snippets.

View nickcharlton's full-sized avatar
🐈‍⬛

Nick Charlton nickcharlton

🐈‍⬛
View GitHub Profile
@nickcharlton
nickcharlton / content.md
Last active October 6, 2021 11:01
Domain Driven Design & Event Storming

Domain Driven Design

  • Ubiquitous Language: the language used by everyone to describe the concepts spoken about (so that they are all on the same page)
  • Bounded Context: "a semantic contextual boundary"; within the boundary, each component has a specific meaning and does specific things
  • Domain:
    • Core Domain: the strategic scope which is core to the business/software product
    • Sub-domain: a sub-part of the overall business domain (supporting is ancillary to the core, but worth implementing in-house, whilst generic isn't, e.g.: user invoicing)
  • Domain Event: a record of some significant event occurring in a bounded context, which can be consumed inside the originating bounded context or by other bounded contexts
  • Aggregate/Entity/Data: a high-level type or model (it may be composed of entities and value objects)
  • Command: an operation which causes a domain event
@nickcharlton
nickcharlton / content.md
Last active September 28, 2021 16:42
Resources for Kafka/Event Streams
All T470s drivers: https://pcsupport.lenovo.com/at/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t470s--type-20js-20jt/downloads/driver-list/
BIOS Update: https://pcsupport.lenovo.com/at/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t470s--type-20js-20jt/downloads/ds120418-bios-update-utility-bootable-cd-for-windows-10-64-bit-81-64-bit-7-32-bit-64-bit-linux-thinkpad-t470s
Dock guide: https://pcsupport.lenovo.com/at/en/solutions/pd028011
@nickcharlton
nickcharlton / content.md
Last active May 28, 2021 16:49
Gist from Drafts

Debugging capybara-table

Bumping Nokogiri to 1.11.5, caused our tests around HTML tables to start failing with ERROR: Recursion limit exceeded. The change that caused this is in commit [#9fcb7d][1] (see also: [the full set of changes][2]), where the recursion limit is restricted to 500 (see: [libxml2 commit][3]), which is how it started happening with this Nokogiri update.

In investigating what was causing this to recur, it seems like we don't need all of capybara-table, as [enough is already included in Capybara itself][4].

I did consider just dropping the dependency, but the Matcher/Renderer classes are key to the usability of our tests — I even tried not using them but trying to factor out the dependency was a horrible experience.

My next step would be to try and switch the Capybara selector that CapybaraTable::RspecMatchers uses to the ones already in Capybara: [table.rb][5] and [table_row.rb][6]. This might be as simple as vendering the RspecMatchers.rb file into the project and seein

@nickcharlton
nickcharlton / content.md
Created May 11, 2021 15:17
Gist from Drafts

Drafts → Basecamp / Trix Rich Text Fields

Problem: Copying text with reference links as Rich Text from Drafts into Basecamp mangles all of the formatting.

Solution:

  1. Inspect Element on the editor
  2. $1.editor.setSelectedRange([0, 0])
  3. Copy as HTML in Drafts
  4. $1.editor.insertHTML(Daily Update …)
@nickcharlton
nickcharlton / how-basecamp-uses-basecamp.md
Created April 3, 2020 15:53
How Basecamp uses Basecamp Notes

How Basecamp uses Basecamp

Recording: https://www.twitch.tv/videos/574380757

  • Points out that nothing has changed with them now WFH; they've always worked this way,
  • HQ is equivalent of a company intranet: docs, files, discussions, etc. Every one has access,
  • Teams are like departments or groups: distinct workspaces for the given team, admin gets to choose who sees what; unless you're added they're hidden,
  • Everything is "commentable": you can discuss things in context on every item,
  • DHH points out that they come back to these; sometimes two years later, giving the example of a an AB test,
  • Everything item exists under a URL; it's always referencable,
@nickcharlton
nickcharlton / Gemfile
Created May 9, 2019 12:21
Alexa Endpoint Demo
source "https://rubygems.org"
gem "sinatra"
[Desktop/landrush-example]% VAGRANT_LOG=debug vagrant up
INFO global: Vagrant version: 2.2.0
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_DEFAULT_PROVIDER="vmware_fusion"
INFO global: VAGRANT_VMWARE_CLONE_DIRECTORY="/Users/nickcharlton/.vagrant.d/clones"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.0/gems/vagrant-2.2.0/bin/vagrant"
INFO global: VAGRANT_INSTALLER_VERSION="2"
@nickcharlton
nickcharlton / swagger.yml
Created October 2, 2018 15:33
A cut down version of the main Swagger example.
---
swagger: "2.0"
info:
description: "This is a sample server Petstore server."
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "[email protected]"
license:

Keybase proof

I hereby claim:

  • I am nickcharlton on github.
  • I am nickcharlton (https://keybase.io/nickcharlton) on keybase.
  • I have a public key ASAFoqwDxAc1JTlEzlbe4JdIcxHM00T-YKGtyclZW-kWfAo

To claim this, I am signing this object: