Skip to content

Instantly share code, notes, and snippets.

Avatar
💃
LGTM!

Thomas Countz Thomascountz

💃
LGTM!
View GitHub Profile
@Thomascountz
Thomascountz / sixth_export.rb
Created Jun 28, 2022
Lo-fi inspired piece written programmatically with Sonic Pi
View sixth_export.rb
use_bpm 68
kicks = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Kicks"
snares = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Snares"
live_loop :click do
sleep 1
end
live_loop :hiss, sync: :click do
sample :vinyl_hiss, amp: 0.3, beat_stretch: 5, rpitch: -8
@Thomascountz
Thomascountz / third_export.rb
Created Jun 27, 2022
Lo-fi Piece written programmatically with Sonic Pi
View third_export.rb
# Listen here: https://soundcloud.com/thomas-countz/third-export
use_bpm 68
kicks = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Kicks"
snares = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Snares"
live_loop :click do
sleep 1
end
View dictionary.rb
class Dictionary
def self.search_danish(word)
new(:da).search(word)
end
def initialize(language)
@language = language
end
def search(word)
@Thomascountz
Thomascountz / insert_all_behavior.rb
Last active Jun 2, 2022
activerecord test script for PR#45036 experimentation
View insert_all_behavior.rb
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
# gem "activerecord", github: "thomascountz/rails", ref: "5942211feba53c8deec8884bcee109a759c5e60d"
gem "activerecord", path: "/worspaces/rails"
gem "sqlite3"
@Thomascountz
Thomascountz / split_names_prototype.rb
Created May 8, 2022
Ruby executable file to test a split_names! prototype - RailsConf 2022
View split_names_prototype.rb
#! /usr/bin/env ruby
## Usage:
# $ chmod +x ./split_names_prototype.rb
# $ ./split_names_prototype.rb
## Run Specs
# Remove breakpoint: (`binding.pry`)
# $ rspec ./split_names_prototype.rb
@Thomascountz
Thomascountz / active_record_test_bed.rb
Created Feb 16, 2022
In-memory ActiveRecord Test Bed
View active_record_test_bed.rb
# active_record_testbed.rb
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'activerecord', require: 'active_record'
gem 'sqlite3', require: true
gem 'pry', require: true
end
@Thomascountz
Thomascountz / kaffe_log.py
Created Jan 22, 2022
A script to read values written to serial from a thermocouple attached to an Arduino to monitor coffee roasting
View kaffe_log.py
#!/usr/bin/env python3
import sys
import getopt
import serial
import time
import datetime
import csv
def main(argv):
@Thomascountz
Thomascountz / coloco
Created Sep 14, 2021
Columnar Datastore?
View coloco
#!/usr/bin/env ruby
## USAGE EXAMPLE
## $ bin/coloco '{ "key": "value" }'
##
## $ find ./datastore -type f | xargs tail -n +1
## ==> ./datastore/key <==
## value
##
## ==> ./datastore/index <==
@Thomascountz
Thomascountz / daq_serial_sensor_samples.ipynb
Last active Aug 22, 2021
Hand gestures prediction based on z-axis accelerometer data from low-cost DAQ hardware
View daq_serial_sensor_samples.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View copenhagenair.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.