This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
#!/bin/sh | |
# Create a package for SPSS's silent installer using FPM. We do this because the "silent" | |
# installer requires a user to be logged in so that the Java installer will run. It | |
# has only been tested with version 21. FPM is just a convenience here - substituting | |
# pkgbuild will work if you create a pkg root structure yourself. | |
# | |
# It requires one argument, the path to the .bin silent installer. | |
# | |
# Configure VERSION, ID_PREFIX, INSTALL_DIR to your liking. We set INSTALL_DIR to its |
# Don't allow observe/control | |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -users mdiaguest -access -on -privs -ControlObserve -ShowObserve -OpenQuitApps -RestartShutDown -SendFiles | |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent | |
# Require permission to observe/control | |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -specifiedUsers | |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users sccadmin -privs -all | |
# Allow everything | |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -users sccadmin -access -on -privs -ALL |
#!/bin/bash | |
# List of users to keep | |
KEEP=$( cat <<EOL | |
/Users/admin | |
/Users/administrator | |
/Users/sccadmin | |
/Users/scclab | |
/Users/Shared | |
/Users/Search |
trix-toolbar .button_group button::before { | |
background-image: none !important; | |
font-family: 'FontAwesome'; | |
font-size: 12px; | |
line-height: 28px; | |
} | |
trix-toolbar .button_group button.bold:before { | |
content: '\f032'; | |
} |
# app/models/board.rb | |
class Board < ApplicationRecord | |
has_many :embeds | |
end |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
Rails has a handy truncate helper (which is actually mostly a method added to String ), but it warns you it's not safe to use on html source, it'll cut off end tags and such.
What if you want an HTML safe one? There are a variety of suggested solutions you can google, none of which were quite robust/powerful enough for me.
So I started with my favorite, by Andrea Singh, using nokogiri.
But:
SoX is a great tool for converting and processing audio. As an engineer working at a radio station I find it especially useful for processing audio files so the volume is even and smooth throughout. A recent use case was preparing news bulletins recorded by a non-technical journalist so they sounded clear and loud for an Amazon Alexa skill.
Automatic Gain Control (AGC) is an audio processing technique that is designed to smooth out volume differences between different parts of an audio programme. The majority of radio stations will have a device at their transmitter (for example, an Optimod) that does just that. Parts of the broadcast that are two quiet are boosted and parts that are too loud are atenuated.
For those familiar with audio [compressors
This is a Stimulus controller which will allow a Shoelace Form component to be processed and submitted by Turbo.
Just wrap your <sl-form>
control with a form tag:
<%= form_with url: "/test-submit" do %>
<sl-form data-controller="shoelace-form">
controls go here
</sl-form>
<% end %>