view_context.helper_method('args') Rails 2 ApplicationController.helpers.helper_method('args') Also see How to use helper methods inside a model...
It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to...
To get your F12 key back for other shortcuts, stop Tilda: killall tilda To prevent Tilda from starting on boot...
...move elements to the back (e.g. background images, gradients etc). They will be rendered behind all other elements within the context (e.g. text), but not behind elements outside the stacking...
You can use this shell command: uniq -u input.txt output.txt
Your package-lock.json should always match and resolve all packages from your package.json. Coming from Yarn, I was looking for an...
The value of the Unicode byte-order character placed at the beginning of the file (BOM). The value given by the charset attribute of the Content-Type...
If you need to debug Analytics tracking, consider using this chrome extension. It will replace the tracking code with a...
Today I learned that you can animate HTML elements using the Web Animation API's method .animate(keyframes, options) (which...
...or newer versions for these libraries before you start. Maybe you can upgrade them beforehand which makes the migration easier. Here are some libraries that I had come across:
...implement the navigation on your own. Tip: Add a feature for your navigation bar beforehand and test links and their highlighting (don't forget dropdown submenus!). After upgrading to Bootstrap...
...number of options. Offers some pretty skins for downloading, but is hard to customize beyond that. SoundManager 2 Free. Only does audio. Awkward API. There seems to be no way...
Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine...
...will be short a window manager. This might be fixable, but it's probably best to simply log out (or shut down) using the Gnome panel...
The rubocop binary has a few interesting flags: rubocop (using the --parallel default ) scans the current repository for linting issues...
Your development server is usually running on an insecure HTTP connection which is perfectly fine for development.
How to define and call class methods in CoffeeScript classes: class Foo @classMethod: -> @otherClassMethod() instanceMethod: -> @otherInstanceMethod() @constructor.classMethod()
...the company above # # # Example: # # class Gallery # has_many :images, :as => :owner # end # # class Image # belongs_to :owner, polymorphic: true # end # # # so container = Image.new; container.file = File.new… , container.owner = object # # Given the file...
...would possibly need in a clean way, I prefer to simply always use them. Behind the scenes, Open3 actually just uses Ruby's spawn command, but gives you a much...
Open3.capture3 Basic usage is require 'open3' stdout_str, error_str, status = Open3.capture3('/some/binary', 'with', 'some', 'args') if status.success? # okay else raise "did not work" end Open3 will raise...
Unlike in Gnome, there is no graphical tool to set a mouse cursor in Xfce. Run this on a terminal...
Nobody needs HTML e-mails. However, you occasionally might have to write an HTML message for some weird reason. Here...
...Although this may be useful for debugging, when writing custom steps you may be better off using XPath...
...when the model has no database or database columns yet. Example: class Post < ApplicationRecord begin # Magically auto-strips all string attributes columns.each do |column| next if [:string, :text].exclude?(column.type...
Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet devices, number fields show a special virtual keyboard that shows...
SELECT enum_range(NULL::portal) # Returns an array of all possible values SELECT unnest(enum_range(NULL::portal)) # Unnests the...