Firstly, you need to install v4l2loopback and obs-v4l2sink. On arch linux with yay:
yay -Syu obs-v4l2sink v4l2loopback-dkms
Then, set up a systemd service:
koyoko% cat /etc/systemd/system/v4l2loopback.service
Firstly, you need to install v4l2loopback and obs-v4l2sink. On arch linux with yay:
yay -Syu obs-v4l2sink v4l2loopback-dkms
Then, set up a systemd service:
koyoko% cat /etc/systemd/system/v4l2loopback.service
| #!/usr/bin/env ruby | |
| # This script reads a list of PIDs from the command line and dumps all readable memory regions. | |
| REGION_PATTERN = /(\h+)-(\h+) (r)/ | |
| ARGV.each do |pid| | |
| maps = File.open("/proc/#{pid}/maps") | |
| mem = File.open("/proc/#{pid}/mem") |
| require_relative 'lib/async/websocket/version' | |
| Gem::Specification.new do |spec| | |
| spec.name = "async-websocket" | |
| spec.version = Async::WebSocket::VERSION | |
| spec.authors = ["Samuel Williams"] | |
| spec.email = ["[email protected]"] | |
| spec.summary = %q{An async websocket library on top of websocket-driver.} | |
| spec.homepage = "" |
| # gem install async-container | |
| gem "async-container" | |
| require 'async/clock' | |
| require 'async/container' | |
| def fibonacci(n) | |
| if n < 2 | |
| return n |
| Sync do | |
| query = subject.call(<<~SQL * 10) | |
| SELECT PG_SLEEP(0.1) AS LIFE; | |
| SQL | |
| query.results do |result| | |
| Console.logger.info(query) {"#{result.count} #{result.field_names}"} | |
| result.each do |row| | |
| Console.logger.info(result, row) | |
| end |
| require 'thread/local' | |
| class Searchable | |
| extend Thread::Local | |
| def initialize | |
| @index = "rubygems" | |
| end | |
| #!/usr/bin/env ruby | |
| require 'async' | |
| require 'async/io/unix_endpoint' | |
| endpoint = Async::IO::Endpoint.unix("foo.ipc") | |
| fork do | |
| Async do | |
| endpoint.accept do |peer| |
| samuel@hana ~ [1]> sudo systemctl enable --now reflector.timer | |
| Created symlink /etc/systemd/system/timers.target.wants/reflector.timer → /usr/lib/systemd/system/reflector.timer. | |
| samuel@hana ~> cat /etc/xdg/reflector/reflector.conf | |
| # Reflector configuration file for the systemd service. | |
| # | |
| # Empty lines and lines beginning with "#" are ignored. All other lines should | |
| # contain valid reflector command-line arguments. The lines are parsed with | |
| # Python's shlex modules so standard shell syntax should work. All arguments are | |
| # collected into a single argument list. |
| #!/usr/bin/env ruby | |
| require 'benchmark' | |
| class Reading | |
| def initialize | |
| @r, @w = IO.pipe | |
| @thread = Thread.new do | |
| @r.read |
| extension DispatchTimeInterval { | |
| func toDouble() -> Double? { | |
| var result: Double? = 0 | |
| switch self { | |
| case .seconds(let value): | |
| result = Double(value) | |
| case .milliseconds(let value): | |
| result = Double(value)*0.001 | |
| case .microseconds(let value): |