...set the Sass options. Webpacker const sassLoaderConfig = environment.loaders.get('sass') const sassLoaderIndex = sassLoaderConfig.use.findIndex(config => { return config.loader === 'sass-loader' }) // Disable deprecation warnings inside dependencies sassLoaderConfig.use[sassLoaderIndex].options.sassOptions.quietDeps = true sassLoaderConfig.use[sassLoaderIndex].options.sassOptions.silenceDeprecations = ['import...
module.exports = { module: { rules: [ { test: /\.s[ac]ss$/i, use: [ "style-loader", "css-loader", { loader: "sass-loader", options: { sassOptions: { quietDeps: true, silenceDeprecations: ['import'], }, }, }, ], }, ], }, }; ESBuild esbuild.build({ // ... plugins: [ sassPlugin({ quietDeps: true, silenceDeprecations...
...s possible you get this "error" message: *** [err :: example.com] There are no Phusion Passenger-served applications running whose paths begin with '/var/www/example.com'. *** [err :: example.com] This is just because there were...
...no running passenger process for this application on the server which could be restarted. It's not a real error. The application process will start if the first request for...
...type of network card is used for a given network interface on a linux system, e.g. because the system has multiple network cards, try and match the driver to the...
...interface name: $ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback...
tl;dr When browsers start to adapt proposals from Open UI, it might not be necessary to use any 3rd party libraries to have nice components and controls in web...
...applications e.g. selects. It would require only a minimum of CSS and Javascript to get them working and looking good. The purpose of the Open UI, a W3C Community Group...
...the test, as if the callback function is not executed in the test. However, since the test does not fail, the method :my_method must have been called during the...
...where the method :my_method should be called This will execute the original implementation (see here...
...to add some custom functionality. This card contains some tips how to achieve this. Setup Basically, follow the guide in the Rails documentation. The automated script may not work with...
...it should be easy to fix. If you don't want the default css shipped with Action Text, you can copy the stylesheet from basecamp's github into your project...
...git rebase -i main. What it does: Opens an interactive rebase UI to choose squash/edit/fixup for each commit of your branch until the first commit (the base). Keeps your branch...
...s base intact (no rebasing onto main). Lets you squash, reorder, edit, or drop commits. Info This is not the same as git rebase -i main, which would rebase your...
...t easily customizable. Example usage /slackfont Comic Neue to use "Comic Neue" (if installed) /slackfont system-ui to use your desktop's system font in Slack. /slackfont (without an argument...
...the default font. Some fonts may be unavailable If you installed Slack through Snap, only system-wide installed fonts (i.e. fonts located in /usr/share/fonts/ or /usr/local/share/fonts/) are available.
You have the following HTML structure:
If you want to run Javascript code whenever someone clicks on a ...
..., you can do this in three different ways: function code(event...
...alert("Someone clicked on .my-target!"); } document.addEventListener('click', function(event) { if (event.target.closest('.my-target')) { code(event) } }) document.querySelector('.container').addEventListener('click', function(event) { if (event.target.closest('.my-target')) { code(event) } })
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and browser restores, but is different per new tab/window (in contrast...
...to localStorage which is shared across all tabs). MDN says: The sessionStorage object is most useful for hanging on to temporary data that should be saved and restored if the...
...a RubyMine plugin that enables you to review and process merge requests within RubyMine! Setup Open RubyMine settings (Ctrl + Alt + S) > Plugins > Search for "GitLab" > Install (You might need to...
...re-open settings afterwards.) In the RubyMine settings > Version Control > GitLab > Connect your GitLab account with "+" Working with merge requests From the Actions menu (Ctrl + Shift + A), choose "View merge...
...browser's HTTPS handling works as expected (which might be compromised e.g. due to security products or enterprise proxy servers...
Update: This is now documented on Edgeguides Ruby on Rails: If you set the :validate option to true, then associated objects will be validated whenever you save this...
...default, this is false: associated objects will not be validated when this object is saved. Setup # post.rb class Post < ActiveRecord::Base has_one :attachment end # attachment.rb class Attachment < ActiveRecord::Base...
...to the public (as it should be!), here's how to open a psql shell inside Kubernetes and connect to the database. Make sure to replace the variables appropriately.
...run postgresql-client \ --image=postgres \ --namespace=$NAMESPACE \ --stdin=true --tty=true \ --rm=true \ --env="PGPASSWORD=$PASSWORD_FOR_POSTGRES \ --command -- \ psql --host=$HOSTNAME_FOR_POSTGRES --username=$USERNAME_FOR_POSTGRES $DATABASE_FOR...
...really want to get their arguments processable as keyword arguments. Don't change the syntax, or you'll experience pain. Always call super inside of your overridden #initialize method. A...
...things happen in the ActiveRecord world. Just let them happen, otherwise kittens will die somewhere. You don't want that. Example class Item < ActiveType::Object def initialize(attributes) super
For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for content primarily consisting of prose, it is not necessarily a...
...good solution for all use cases. The main issue is that it is only possible to search for prefixes of text tokens, which can potentially be unexpected for users.
...main mechanisms for background processing are cronjobs (managed with whenever) job queues, usually with Sidekiq Learn about cronjobs Read HowTo: Add Jobs To cron Under Linux or UNIX? Understand how...
...the load of your application. Decide whether cronjobs should run on one or all servers Note We use the whenever to automatically rewrite the crontab when we deploy. You have...
Ever wondered how you can create a simple table output in bash? You can use the tool column for creating a simple table output. Column gives you the possibility to...
...same level. Pipe output to column -t (maybe configure the delimeter with -s) and see the magic happening. detailed example I needed to separate a list of databases and their...
When you make a simple TCP connection to a remote server (like telnet), your client won't normally notice when the connection is unexpectly severed on the remote side. E.g...
...if someone would disconnect a network cable from the server you're connected to, no client would notice. It would simply look like nothing is being sent. You can detect...
...life as web developers we are constantly faced with technical problems that can be solved with a variety of (sometimes vastly different) technologies. Choosing the right tool for the tasks...
...is crucial for our mid- and long term success. Our technology radar card documents what we're currently investigating either to replace or introduce to our stack of tools. Start...
I recently had to update a few selective npm libraries in a project that uses pnpm to apply a CVE mitigation. My first instinct was to modify the package.json file...
...a much better way. Use pnpm up (aliased to update and upgrade) with a set of exact library names and versions. The resulting changes (both to the package.json and pnpm...
When you want to filter records in a model where a string column roughly matches a given term, you can use PostgreSQL’s trigram similarity search. Writing a fuzzy query...
User.where("similarity(name, ?) > 0.3", "John") This finds all users where the name is similar to "John" with a similarity score above 0.3. You can tune the threshold:
...window manager that provides neat features like automatic layouting of windows, good multi-display support with per display workspaces and more. Since it is only a window manager, you will...
...menus, automatic updates etc. Fortunately, you can run Awesome within MATE, by following these steps (tested on Ubuntu MATE 16.04): Awesome + MATE Create the following file at /usr/share/xsessions/Xsession.desktop: [Desktop Entry...
Canonical does not ship Ubuntu 24.04+ Vagrant images due to HashiCorps switch to the Business Source License (BSL). There is currently no open source fork of Vagrant. Alternatives
...cloud-image/ubuntu-24.04 which can be used. Caveats The images are unmodified but unofficial. Sharing via the /vagrant folder is not possible. Use SSH/SFTP instead...