Skip to content

Instantly share code, notes, and snippets.

@jwhiting
jwhiting / jw-dev-llm-tips.md
Last active July 18, 2024 21:51
JW's accumulated tips for using llms as a dev

JW's accumulated tips for using LLMs as a dev

These mostly came out of various workshops, talks, and conversations at the AI World's Fair SF 2024. For example, the GitHub Copilot sessions, and there were other sessions dedicated to developer productivity such as Manuel Odenhal's session (link). I've aggregated the thinking on my own added more of my own thoughts as I've been incorporating more AI tools as a developer.

What LLMs are good at

  • They are excellent at translation. Given input material in form X, produce output in form Y.
  • They are excellent at reproducing and remixing commonly seen coding tasks
  • They are great at generating feasible starting points for solutions given well-described, constrained problems.
  • They are helpful for assisting in the higher-level design process and architectural thinking behind software development through brainstorming, thinking things through
@jwhiting
jwhiting / python3_s2geometry
Created September 10, 2019 21:42
Dockerfile for python3 with s2geometry bindings
FROM python:3.7
WORKDIR /usr/src/app
# deps for s2 geometry lib
RUN apt-get update
RUN apt-get install -y cmake libgflags-dev libgoogle-glog-dev libgtest-dev libssl-dev swig
# get the repo and setup the build process. note the CMAKE_INSTALL_PREFIX:PATH config
# is not in google's instructions for how to build the library, but otherwise python
@jwhiting
jwhiting / reaper-hung-midi-thread-links.md
Last active August 6, 2018 20:36
Threads about hung midi notes in Reaper
@jwhiting
jwhiting / truncate_logs.config
Created June 9, 2018 04:51
truncating multi-container docker logs on elastic beanstalk
# this would go in, for instance, .ebextensions/truncate_logs.config
files:
"/etc/cron.d/truncate_logs":
mode: "000644"
owner: root
group: root
content: |
*/5 * * * * root truncate -s 0 /var/lib/docker/containers/*/*-json.log
*/5 * * * * root rm -f /var/log/containers/rotated/*
@jwhiting
jwhiting / warmup.rb
Created May 14, 2018 22:00
Warming up EBS volumes on RDS replicas/snapshots (ruby script)
#!/usr/bin/env ruby
require 'pg'
=begin
when creating a postgres db replica in RDS, or restoring from a snapshot, the
underlying EBS volume of the new instance must be initialized by reading every
block, otherwise the blocks will be lazy-initialized by production queries
which will be extremely latent. (i've seen normally 50ms queries take 30s in
option_settings:
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: StreamLogs
value: true
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: DeleteOnTerminate
value: false
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: RetentionInDays
value: 14
@jwhiting
jwhiting / gist:74953e9462acd6059f070e366053ce48
Last active July 23, 2018 19:01
Modified ReaperJS oscilloscope with beat sync retrig feature
desc:Oscilloscope Meter (Cockos)
//tags: analysis scope meter
//author: Cockos (modified by JSW)
/*
Copyright (C) 2007 Cockos Incorporated
License: LGPL - http://www.gnu.org/licenses/lgpl.html
*/
slider1:view_msec=100<1,2000,1>-view size (ms)
slider2:view_maxdb=0<-450,36,.1>-vzoom