Skip to content

Instantly share code, notes, and snippets.

View jwhiting's full-sized avatar

Josh Whiting jwhiting

View GitHub Profile
@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
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 / 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
@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 / reaper-hung-midi-thread-links.md
Last active August 6, 2018 20:36
Threads about hung midi notes in Reaper
@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