INFO [40a72eff] Finished in 1.109 seconds with exit status 0 (successful).
ERROR /usr/local/bundle/ruby/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: /usr/local/lib/ruby/3.3.0/csv.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec.
WARNING: you don't own a lock of type ExclusiveLock
bin/rails aborted!
ActiveRecord::ConcurrentMigrationError: (ActiveRecord::ConcurrentMigrationError)
Failed to release advisory lock
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
remote_transmitter: | |
pin: GPIO5 | |
# RF uses a 100% carrier signal | |
carrier_duty_percent: 100% | |
button: | |
- platform: template | |
name: Light Off Raw | |
on_press: | |
- remote_transmitter.transmit_raw: |
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
{ | |
"requests": [{ | |
"to": "\/dsiot\/edge.adp_i?filter=pv,md", | |
"op": 2 | |
}, { | |
"op": 2, | |
"to": "\/dsiot\/edge.adp_d?filter=pv,md" | |
}, { | |
"to": "\/dsiot\/edge.adp_f?filter=pv,md", | |
"op": 2 |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'nokogiri' | |
XSL = <<-EOXSL | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" encoding="ISO-8859-1"/> | |
<xsl:param name="indent-increment" select="' '"/> | |
<xsl:template name="newline"> |
Puma Dev creates it's own SSL certificate to provide the https://hostname.localhost feature and adds it to your system certificates - but Ruby clients doen't use that. So you need manually add the PumaDev cert to the certs Ruby uses.
For Rails, add a file like config/initializers/puma_dev_client_ssl.rb
- but we don't want this in production. Depending on your setup, you may need it in test also.
if Rails.env.development?
unless File.exist?("/tmp/cert.pem")
# Create a new cert file including both Puma Dev ssl certificate and Ruby's default certs
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
mc anonymous set download myalias/mybucket |
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
#!/usr/bin/env ruby | |
require 'open3' | |
require 'tempfile' | |
## | |
# Create a single m4b file from multiple mp3 files. | |
# Finds all *.mp3 files, merges them, in lexigraphical order, creates chapters based on the mp3 files, adds cover.jpg as a cover | |
## Todo |
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
## Checking files in your bucket are referenced by ActiveStorage | |
require 'aws-sdk-s3' | |
s3_client = Aws::S3::Client.new( | |
region: "us-east-1", | |
access_key_id: Rails.application.credentials.dig(Rails.env, :s3, :access_key_id), | |
secret_access_key: Rails.application.credentials.dig(Rails.env, :s3, :secret_access_key), | |
endpoint: "https://myendpoint.com", | |
force_path_style: true |
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
ffmpeg -i input.mp3 -c:a aac -b:a 192k -vn output.m4a && mv output.m4a output.m4r | |
# -i input.mp4: Specifies the input video file (replace with your input file path). | |
# -vn: Tells FFmpeg to ignore the video stream. | |
# -c:a aac: Sets the audio codec to AAC. | |
# -b:a 192k: Sets the audio bitrate to 192 kbps (adjust as needed). | |
# output.m4a: Specifies the output M4A file. |
NewerOlder