Skip to content

Instantly share code, notes, and snippets.

View djch's full-sized avatar

Dan Charlesworth djch

  • Getbusi
View GitHub Profile
## IDENTITY and PURPOSE
You are programming assistant specialized in {{ DESCRIBE HERE THE LANGUAGE/FRAMEWORKS (React 19, Next.js and Tailwind) }} .
## TONE AND STYLE
You adhere to {{ NAME OF THE TOOLS }} conventions. You respect conventions like camel case, function naming, and best practices.
## HERE EXAMPLES OF THE CODE CONVENTIONS I WANT YOU TO USE
@dhh
dhh / linux-setup.sh
Last active September 23, 2025 13:15
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@AntonFriberg
AntonFriberg / README.md
Last active July 2, 2025 23:04
Multiple Python Installations on Linux Using Mise-en-Place (an asdf rust clone)

Multiple Python Installations on Linux Using Mise

Note: Mise was previously called RTX

I have tried a lot different ways of managing multiple Python versions on different Linux systems.

  • pyenv
    • Uses shims which is confusing, especially for new users
  • Compiling from source
@brenogazzola
brenogazzola / util_controller.js
Created October 5, 2021 15:45
Stimulus Controller
import { Controller } from 'stimulus'
export default class extends Controller {
// ============================================================================
// Public
// ============================================================================
/*
* Removes an element from the DOM
*/
@dhh
dhh / pagination_controller.js
Last active August 26, 2025 17:15
HEY's Stimulus Pagination Controller
/*
ERB template chunk from The Feed's display of emails:
<section class="postings postings--feed-style" id="postings"
data-controller="pagination" data-pagination-root-margin-value="40px">
<%= render partial: "postings/snippet", collection: @page.records, as: :posting, cached: true %>
<%= link_to(spinner_tag, url_for(page: @page.next_param),
class: "pagination-link", data: { pagination_target: "nextPageLink", preload: @page.first? }) unless @page.last? %>
</section>
@jamiemling
jamiemling / Customer Success Engineer - Tasks.md
Last active March 11, 2020 23:25
Customer Success Engineer - Tasks

These are some of the things you might do each day working in support at Raisely.

Tell us out of this list two things you are excited about, two things you want to learn how to do and two you don't want to do.

  • Responding to 20 support emails
  • Running a training webinar
  • Importing data into a new Raisely CRM account
  • Writing a new support article on how to optimise your donation form
  • Updating the developer docs to cover a new release
  • Create a video tutorial on how to set up a campaign element
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active October 10, 2025 02:37
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@javan
javan / direct-uploads.md
Last active January 9, 2025 01:00
Active Storage direct uploads

direct-uploads

rails/activestorage#81

// direct_uploads.js

addEventListener("direct-upload:initialize", event => {
  const { target, detail } = event
  const { id, file } = detail

Coding Problems

Evaluation criteria

  • Code demonstrates knowledge of Ruby syntax, style, organisation, and refactoring
  • Code is divided into logical components and methods with clear responsibility.
  • Code meets all requirements as laid out per the specification.

In one sentence: we are looking for simplicity, readability, and good practices

@benschwarz
benschwarz / pg.md
Last active October 16, 2024 23:15
Awesome postgres