makandra dev
github.com

...seems to be really eager to maintain the library it requires no configuration (just include it to your page), but offers a powerful API it was written to be performant...

...need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib...

--srcdir=. --curdir --ruby=/home/user/.rbenv/versions/1.9.3-p551/bin/ruby --with-ruby-dir --without-ruby-dir --with-ruby-include --without-ruby-include=${ruby-dir}/include --with-ruby-lib --without-ruby-lib=${ruby-dir}/lib...

...use "git restore --staged ..." to unstage) deleted: app/assets/stylesheets/pagination.sass Untracked files: (use "git add ..." to include in what will be committed) app/assets/stylesheets/pagination.sass Now use fixup to add the commit to delete...

...bar' # same thing h['foo'] # => 'bar' h.foo # => 'bar' in? (> 3.0 only) reverse of Array#include? characters = ["Konata", "Kagami", "Tsukasa"] "Konata".in?(characters) # => true Array.wrap wraps argument in an array, unless...

...return withAuthorizedUser(async ({ accessibleBy }) => { const prisma = await prismaClient() const comment = await prisma.comment.findUnique({ where: { uuid }, include: { file: true }, }) if (!comment) { return notFound() } await prisma.comment.delete({ where: { uuid, AND: accessibleBy('delete').Comment, }, }) revalidatePath...

Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts

PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in unique indexes Usually this is fine, but some strings (like...

In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you...

...database-specific tool like pg_dump, you can now serialize every single schema property, including proprietary features. Unfortunately using structure.sql comes with some disadvantages. Why structure.sql can churn wildly

...lot of noise and merge conflicts in your repository. Possible reasons for this churn include: Two developers use different versions of the database server (e.g. PostgreSQL 16 vs. 17).

...in your stylesheets. Usually this should not be a problem, but at times they include misleading Meta-information that leads to a strange error in the PDF. The setup

...a few minor changes. If you have the vcr and webmock gems installed, simply include: # spec/support/vcr.rb VCR.configure do |c| c.cassette_library_dir = Rails.root.join("spec", "vcr") c.hook_into :webmock end RSpec.configure...

makandra dev
rails-sqli.org

...methods can open up code to SQL Injection exploits. The examples here do not include SQL injection from known CVEs and are not vulnerabilites themselves, only potential misuses of the...

...TypeScript, and modern browsers will run them natively. Features supported by all modern browsers include: fat arrow functions (() => { expr }) let / const class async / await Promises Generators Symbols Rest arguments (...args...

mso-line-height-rule: exactly; line-height: 0; } Make sure to include mso-line-height-rule: exactly. Otherwise, MS Outlook will treat your line-height as a minimum...

This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...

evilmartians.com

...suite of tools designed to improve the performance of Ruby test suites. Key tools include: EventProf: Measures the time spent on specific events during tests to identify slow processes.

Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that you want to add some custom functionality. This card contains...

...even if it spans over multiple elements in the HTML. Imagine a page that includes this HTML: Hi! Try to match me. Even though the text is separated by a...

I recently noticed a new kind of flaky tests on the slow free tier GitHub Action runners: Integration tests were...

For Selenium tests, your browser starts in your local timezone, or whatever your system's environment specifies. This is usually...

...hook will run after all scenarios have been executed. AfterAll do ... end You can include code to Cucumber in the World module without polluting the application namespace (example from...

...combining international and local numbers, see example below) as the called number should not include that zero. def tel_to(text) groups = text.to_s.scan(/(?:^\+)?\d+/) if groups.size > 1 && groups...

...trait for validating the extensions and content types in all of your uploaders (by including it on the base uploader) and that it now looks like this: class BaseUploader

...in this trait, these lines should now be removed. class BaseUploader < CarrierWave::Uploader::Base include DoesStrictTypeValidations # ... end Now, in your uploaders... def extension_white_list %w[jpg jpeg gif png...