Skip to content

Instantly share code, notes, and snippets.

ChatGPT Builds A Rudimentary Whiteboarding App

Here's the conversation I had collaborating with ChatGPT to build a basic diagramming app.

Features

  • Canvas based rendering
  • You can create rectangles (click to create a rectangle)
  • You can move rectangles (click on Move Rectangle)
  • You can change the fill color of rectangles (Click on Change Color, then click on a rectangle to randomly assign it a fill color)

Notes

@marteinn
marteinn / solution-asdf-unrecognized-format.md
Created May 28, 2021 07:29
Solution for Unrecognized archive format in asdf

Are you getting the error "Unrecognized archive format" while trying to install php on asdf?

asdf install php 7.4                                                                                                                      develop ⬆ ✖ ✱ ◼
Determining configuration options...
Downloading source code...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   120  100   120    0     0    272      0 --:--:-- --:--:-- --:--:--   272
100    14  100    14    0     0     18      0 --:--:-- --:--:-- --:--:--    18
@shilman
shilman / storybook-controls-typescript-walkthrough.md
Last active May 22, 2022 06:49
Storybook Controls Walkthrough

Storybook Controls w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Controls. It's also an introduction to Storybook Args, which is a major update to Storybook's Component Story Format (CSF): a more portable and ergonomic way to write stories.

This walkthrough gives you:

  • Auto-generated controls in the addons panel
  • Auto-generated controls in your Docs
  • Auto-generated actions for event logging
  • An introduction to the future of CSF
@yogthos
yogthos / clojure-beginner.md
Last active April 18, 2025 02:43
Clojure beginner resources

Introductory resources

@mvcds
mvcds / .config-fish-config.fish
Last active January 28, 2025 15:14
Git Backup
# ~/.config/fish/config.fish
if status is-interactive
# Commands to run in interactive sessions can go here
end
function setenv; set -gx $argv; end
source ~/.env
source /opt/homebrew/opt/asdf/libexec/asdf.fish
direnv hook fish | source
@SKempin
SKempin / Git Subtree basics.md
Last active April 27, 2025 18:43
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@danielbdias
danielbdias / promise-if-example-01.js
Last active March 6, 2017 19:57
To set promiseChain or not to set promiseChain, that is the question
const printablePromise = text =>
new Promise(resolve => {
console.log(text)
return resolve()
})
const actionA = () => printablePromise('A')
const actionB = () => printablePromise('B')
const actionC = () => printablePromise('C')
const actionD = () => printablePromise('D')
@eschwartz
eschwartz / Dockerfile
Last active November 2, 2023 15:11
npm install from private repo, in docker build
# Add these lines to your dockerfile, before `npm install`
# Copy the bitbucket private key to your docker image
COPY ./bitbucket_ssh_key /opt/my-app
# Copy the ssh script to your docker image
COPY ./ssh-bitbucket.sh /opt/my-app
# Tell git to use your `ssh-bitbucket.sh` script
ENV GIT_SSH="/opt/map-project-tile-server/ssh-bitbucket.sh"
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active March 23, 2023 13:02
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@adrianorsouza
adrianorsouza / sublime-command-line.md
Last active September 26, 2023 16:26
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup