I hereby claim:
- I am tcdowney on github.
- I am tcdowney (https://keybase.io/tcdowney) on keybase.
- I have a public key whose fingerprint is 90C8 2606 77B1 FF63 34C1 1DEE 301B 9993 40D5 E292
To claim this, I am signing this object:
| (define atom? | |
| (lambda (x) | |
| (and (not (pair? x)) (not (null? x))))) | |
| ;; Test code | |
| (atom? (quote ())) |
| ;; A lat is a list of atoms. | |
| (define lat? | |
| (lambda (l) | |
| (cond | |
| ((null? l) #t) | |
| ((not (atom? (car l))) #f) | |
| (else (lat? (cdr l)))))) |
| (define member? | |
| (lambda (a lat) | |
| (cond | |
| ((null? lat) #f) | |
| (else (or (eq? (car lat) a) (member? a (cdr lat))))))) |
| (define free? | |
| (lambda (y e ce) | |
| (pmatch e | |
| [,x (guard (symbol? x)) (and (eq? x y) (not (memq y ce)))] | |
| [(lambda (,x) ,body) (free? y body (cons x ce))] | |
| [(,rator ,rand) (or (free? y rator ce)(free? y rand ce))]))) |
| void ds_gyro_read(uint8_t* pBuffer, uint8_t ReadAddr, volatile uint16_t NumByteToRead) { | |
| if (NumByteToRead > 0x01) { | |
| ReadAddr |= (uint8_t)(0x80 | 0x40); // If sending more that one byte set multibyte commands | |
| } | |
| else { | |
| ReadAddr |= (uint8_t) (0x80); // Else just set the read mode | |
| } | |
| GYRO_CS_LOW(); | |
| //GPIO_ResetBits(GPIOE, GPIO_Pin_3); |
| def eratosthenes(n) | |
| nums = [nil, 1, *2..n] | |
| (2..Math.sqrt(n)).each do |i| | |
| (i**2..n).step(i){|m| nums[m] = nil} if nums[i] | |
| end | |
| nums | |
| end | |
| primes_to_million = eratosthenes(1_000_000) |
| # spec/support/missing_translations.rb | |
| require 'rspec/expectations' | |
| RSpec::Matchers.define :have_missing_translations do | |
| match do |actual| | |
| missing_i18n_js = /\[missing ".*" translation\]/ | |
| missing_i18n_ruby = /class="translation_missing"/ | |
| !!(actual.body.match(missing_i18n_ruby) || actual.body.match(missing_i18n_js)) | |
| end |
| # Inspired by https://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card | |
| # Gonna see if I can get by with just disabling swap for now | |
| # Disable SWAP | |
| sudo dphys-swapfile swapoff && \ | |
| sudo dphys-swapfile uninstall && \ | |
| sudo update-rc.d dphys-swapfile remove | |
| leading_digit_regex = /\d+\s+/ | |
| path = '/Users/tcdowney/Downloads/ga-vids' | |
| Dir.glob("#{path}/*.mp4") do |mp4_file| | |
| filename = File.basename(mp4_file, File.extname(mp4_file)) | |
| leading_digits = filename.match(leading_digit_regex)[0].to_i | |
| padded_digits = sprintf('%03d', leading_digits) | |
| padded_filename = filename.gsub(leading_digits.to_s, padded_digits) | |
| #puts padded_filename + File.extname(mp4_file) | |
| File.rename(mp4_file, padded_filename + File.extname(mp4_file)) |
I hereby claim:
To claim this, I am signing this object: