require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'activerecord'
gem 'sqlite3'
gem 'rspec'
gem 'pry'
end
This works for all mics including webcam mics.
bin/mic-on
#!/usr/bin/env bash
# toggle webcam mic
amixer -c 1 sset Mic cap
# toggle default mic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hold power button for 5 seconds to enter pairing mode | |
Open Bluetooth Devices and press Search | |
Right click UTAXO UT-BH001 and click Pair | |
Right click UTAXO UT-BH001 and press Add audio sink | |
Set volume in PulseAudio Volume Control (pavucontrol) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nothing = Object.new | |
result = [1,nil,2,4,nil].find(Nothing) { |i| i == nil } | |
if result == Nothing | |
else | |
end |
class FieldDefinition
def meta
Meta.new
end
end
class TextFieldDefinition < FieldDefinition
class Meta
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Yahify | |
def call(str) | |
str + 'YAH' | |
end | |
def self.to_proc | |
proc { |str| new.call(str) } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
gemfile(false) do | |
source "https://rubygems.org" | |
gem "rspec" | |
gem "pry" | |
gem "activerecord" | |
gem "sqlite3" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
class Pipe | |
def self.pipe(*args) | |
new(args) | |
end | |
def self.[](*args) | |
new(args) | |
end |
class Izzy
def initialize(sign, n)
@s = sign
@n = n
end
def ===(other)
other.send(@s, @n)
end
Ruby 2.6 on Ubuntu with Bundler 2.x
# Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install -y build-essential wget gcc automake autoconf autogen libtool make cmake bison unzip flex libqt4-dev zlib1g zlib1g-dev libqtwebkit-dev libreadline6 libreadline-dev libreadline6-dev libssl-dev libfontconfig1-dev chrpath mysql-client libxml2-dev libxslt1-dev libxslt-dev libmysqlclient-dev libsqlite3-dev git git-core xvfb socat libyaml-dev libgdbm-dev libncurses5-dev libffi-dev