(Forked fork, that works on macos, too)
Makes little scrolly text jiffs in Flywheel colors.
- macos:
brew install fontconfig imagemagick gifsicle
- Linux:
sudo apt install fontconfig imagemagick gifsicle
# frozen_string_literal: true | |
source 'https://rubygems.org' | |
gem 'puma' | |
gem 'sinatra' | |
gem 'sinatra-contrib' |
[*('A'..'Z'), *('a'..'z')].map do |c| | |
puts [c, eval("%#{c}(ls)")].inspect | |
rescue Exception | |
puts "#{c} not allowed" | |
end; 0 |
### Experiments | |
# https://ruby-doc.org/core-2.5.0/SizedQueue.html | |
log = SizedQueue.new(100) | |
# https://ruby-doc.org/core-2.5.0/Queue.html | |
queue = Queue.new | |
# https://ruby-doc.org/core-2.5.0/ThreadGroup.html | |
group = ThreadGroup.new # pool | |
5.times do |i| | |
# https://ruby-doc.org/core-2.5.0/Thread.html |
#include <Adafruit_NeoPixel.h> | |
#include <avr/power.h> | |
#include <avr/interrupt.h> | |
#include <avr/sleep.h> | |
#define STRIP_PIN 6 | |
#define TRIGGER_PIN 2 | |
#define CONTROL_LED 13 | |
// Note: this duration should be also longer than the HIGH time of the PIR |
#!/bin/sh | |
targets=(armv7-unknown-linux-musleabihf thumbv7em-none-eabi armv7-unknown-linux-musleabihf) | |
toolchains=(stable beta nightly) | |
for toolchain in $toolchains; do | |
for target in $targets; do | |
echo "--> toolchain $toolchain and target $target" | |
rustup target install $target --toolchain $toolchain | |
# rustup target remove $target --toolchain $toolchain |
require 'spec_helper' | |
module CallableSubject | |
def callable_subject(&_block) | |
subject { -> { yield } } | |
end | |
end | |
RSpec.configure do |c| | |
c.extend(CallableSubject) |
use std::ops::Deref; | |
struct StateFn(fn(&mut Machine) -> StateFn); | |
impl Deref for StateFn { | |
type Target = fn(&mut Machine) -> StateFn; | |
fn deref(&self) -> &Self::Target { | |
&self.0 | |
} |