From the Proxmox Forum
pct list
pct stop 999
## 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 |
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. |
#!/usr/bin/env ruby | |
require 'bundler/inline' | |
#gemfile do | |
# source 'https://rubygems.org' | |
# gem 'zip' | |
# gem 'nokogiri' | |
# gem 'tty-prompt' | |
# gem 'debug' |
def zzz | |
t = `pbpaste` | |
`echo "#{t.split.map {|t| t.tr(',', '') }.join(', ')}" | pbcopy` | |
end | |
From the Proxmox Forum
pct list
pct stop 999
#... | |
WORKDIR /rails | |
#... | |
# https://github.com/libjxl/libjxl/blob/main/BUILDING.md | |
FROM base as buildjxl | |
ENV CC=clang | |
ENV CXX=clang++ | |
RUN apt-get update -qq && \ | |
apt-get install --no-install-recommends -y git cmake pkg-config libbrotli-dev libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev clang make build-essential && \ |
Feedjira.parse(URI.open("https://blog.booko.com.au/feed/").read).entries.max_by {|e| e.categories.max_by {|c| c.length }.then {|c| c.length } } |
# https://isni.org/page/linked-data/ | |
# https://isni.oclc.org:2443/isni/public_export/ISNI_persons.jsonld.gz | |
wget https://isni.oclc.org:2443/isni/public_export/ISNI_persons.jsonld.gz | |
# The file I downloaded was full of the 0x1E character, or ^^ in ASCII. This will strip that | |
sed 's/\x1E//g' ISNI_persons.jsonld > cleaned_ISNI_persons.jsonld | |
# Then use JQ to convert the file into the way more sane JSONL format. By default, it tries to read it all into |
def random_isbn13 | |
isbn12 = rand(978_000_000_000..979_999_999_999).to_s | |
chksum = (10 - isbn12.each_char.with_index.sum { |digit, i| digit.to_i * (i.even? ? 1 : 3) } % 10 ) % 10 | |
"#{isbn12}#{chksum}" | |
end | |
def risbn13 = rand(978_000_000_000..979_999_999_999).then {|isbn12| "#{isbn12}#{(10 - isbn12.to_s.each_char.with_index.sum { |digit, i| digit.to_i * (i.even? ? 1 : 3) } % 10 ) % 10}" } |
class Favicon | |
def initialize(doc, url: nil) | |
@doc = doc | |
@url = if url | |
@url = URI(url.to_s) | |
elsif canonical | |
URI(canonical) | |
else |