Skip to content

Instantly share code, notes, and snippets.

@kmarcisz
kmarcisz / deepseek-r1-todo-app.md
Created January 21, 2025 20:25
deepseek-r1-todo-app.md

write a todo app that i can use in the browser. don't write anything about the server, i can do that.

Okay, I need to help the user create a simple todo app that runs in the browser without any server setup. The user mentioned they can handle the server part themselves, so I should focus on the frontend and local storage.

First, I'll outline the basic features: adding todos with a title and description, marking them as complete or incomplete, deleting them, and persisting data locally. No need for backend integration since it's client-side only.

I'll structure the HTML to include an input field for the todo title, another for the description, an add button, and a list to display the todos. Using JavaScript, I can handle adding new items to an array

This will upgrade the forum in two steps. First we will upgrade to latest psql database, requiered by AWS. Once that is done we will upgrade the app itself through CLI, which is required by Discourse itself.
To upgrade database run this script. Upgrade will take ~10 minutes and can be tracked through the website or CLI
```
aws rds modify-db-instance \
--db-instance-identifier production-discourse \
--allow-major-version-upgrade \
--apply-immediately \
--db-parameter-group-name default-postgres-16 \
--engine-version "16.1"
https://www.dropbox.com/scl/fi/sux76ew2adhm4ugdncf3k/MozaikUpdate12_3_13.exe?rlkey=17iaednip1xywi1wvzrimglj7&dl=1
@kmarcisz
kmarcisz / pulls.js
Created September 27, 2023 04:23
pulls.js
// if we add pullStyles.pullModern this array will keep on growing for no good reason
getPullSpacing() {
if (this.swing && [CabinetConstants.pullStyles.pull, CabinetConstants.pullStyles.pullSquare].includes(this.pull.style)) {
return this.pull.spacing / 25.4;
}
}
@kmarcisz
kmarcisz / setup_16.x.sh
Created September 26, 2023 19:07
setup_16.x
#!/bin/bash
# Discussion, issues and change requests at:
# https://github.com/nodesource/distributions
#
# Script to install the NodeSource Node.js 16.x repo onto a
# Debian or Ubuntu system.
#
# Run as root or insert `sudo -E` before `bash`:
#

New features in ruby

JIT experimental

Increased performance, not ready for production just yet. synthetic tests

Features

1. update system
```
$ echo 'Acquire::https::oss-binaries.phusionpassenger.com::Verify-Peer "false";' > sudo tee -a /etc/apt/apt.conf.d/99phusionpassenger-cert
$ sudo update-ca-certificates -f
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt autoremove
$ sudo apt-get install apt apt-utils base-files dpkg libapt-pkg5.0 ubuntu-advantage-tools ubuntu-server update-notifier-common
```
 user_id | project_count 
---------+---------------
  215991 |          7335
  106317 |          5288
   84505 |          4025
   50975 |          2977
  189130 |          2876
   55967 |          2842
 401071 | 2816

Connecting

To connect to camera calibration instance make sure you have the following (or equivalent) settings in your ~/.ssh/config file

Host staging-easel*
  User ubuntu
  IdentitiesOnly yes
  IdentityFile ~/.ssh/easel-ssh.pem
  ForwardAgent yes