...simply issuing an extra query, like this: SELECT post.* FROM posts LIMIT 20 OFFSET 100; SELECT COUNT(*) FROM posts; This is fine most of the time. But rarely, you might...

...it needs to be. SELECT posts.* FROM (/* some complicated_subquery */) posts LIMIT 20 OFFSET 100; SELECT COUNT(*) FROM (/* some complicated subquery */) posts; Here the subquery had to run twice. (Although...

github.com

...XSS]: (javascript:prompt(document.cookie)) [XSS](javascript:window.onerror=alert;throw%20document.cookie) [XSS](javascript://%0d%0aprompt(1)) [XSS](javascript://%0d%0aprompt(1);com) [XSS](javascript:window.onerror=alert;throw%20document.cookie) [XSS](javascript://%0d...

...20document.cookie) [XSS](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K) [XSS](vbscript:alert(document.domain)) [XSS](javascript:this;alert(1)) [XSS](javascript:this;alert(1)) [XSS](javascript&#58this;alert(1))

Exercise 1: Maps In MovieDB, add a new field “Principal filming location”. In a movie’s show view, geocode that location and show a Google map centered around it

...a flaky test that retries to often (the example set default_retry_count to 1...

weblog.jamisbuck.org

(gdb) t a a bt # thread apply all backtrace (gdb) call (void) close(1) # close the existing file descriptors for stdout (gdb) call (void) close(2) # close the existing...

Previous method on Ruby < 2.4 Article from 2016 Article from 2006 Ruby 1.8.7 # First, find out the PID of your Ruby process (e.g. passenger-status)

Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout server.key...

...upgrade to take a few days even the diff is quite small afterwards. Preparations 1. Find all libraries that are bundled with the asset pipeline. You can check the application.js...

...have to be copied to a private node package into the project. Introduce Webpacker 1. Install Webpacker 2. Check if css extraction is enabled in webpacker.yml: # Extract and emit a...

...but is actually quite simple when using docker and turning off some verification steps. 1. Start a keycloak instance using docker mkdir -p keycloak_data && docker run --network=host -e...

...Was ist ein Kubernetes "Service" und für was brauche ich diesen? Inhalte Einleitung, Kapitel 1

...increase your build times significantly, but produce the smallest output: Terser (3 pass) Terser (1 pass) esbuild application.js 163.6 kB 163.7 kB 181.6 kB application.js (gzipped) 54.7 kB

makandra Curriculum

...sidebar with navigation links, a big content area and a footer: +------------------------------------------------------+ | | | BIG LOGO | | | +------------+-----------------------------------------+ | | | | Link 1 | HEADLINE | | | | | Link 2 | Lorem ipsum dolor amit. | | | At vero eos et accusam et justo. |

Has no options to sort the loaded files in any way. RSpec 1 Runs .rb files in alphabetical order by default. This is a good default because it...

...convert it into its RGB values using plain Ruby. >> "#ff8000".match(/^#(..)(..)(..)$/).captures.map(&:hex) => [255, 128, 0] You can use that to implement a simple "hex to CSS rgba value with...

...captures.map(&:hex) "rgba(#{rgb.join(", ")}, #{opacity})" end >> hex_color_to_rgba("#ff8000", 0.5) => "rgba(255, 128, 0, 0.5)" If you need to support RGBA hex color codes, you need to handle...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...

Using Ruby 1.8.7 you will not be able to use the maximum versions Rubygems 1.8.30 and Bundler 1.17.3 with https://rubygems.org/ anymore. This is a result of a server certificate...

...fetching data: hostname was not match with the server certificate (https://rubygems.org/*) Fix 1: Use docker and gemstash (recommended for makandra employees) Use our legacy docker setup for development...

...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...

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno1np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode...

...the screen. The player starts with a score of 0. The arena randomly shows 1 out of 6 total moles. The aim of the game is to click on the...

...randomly hidden or shown. When the user clicks on a visible mole, she gets 10 points added to her score. When the user clicks on a hidden mole, she gets...

...that has two areas with a distinct look and feel. For instance there is (1) a visually ambitious frontend for consumers and (2) an admin area that has tightly packed...

...suspect parallel execution for bundling issues, you can try serially with bundle install --jobs 1...

...row.insertBefore imageTemplate # Prepare the template to be cloned for the next image increaseTemplateIndices: -> # E.g. ("[1]", "1") -> "[2]" increase = (match, $1) -> match.replace $1, parseInt($1) + 1 imageTemplate.find('input').each -> $input = $(this...

# @return: The progress bar element addProgressBar: (element) -> progressBar = $(' ').addClass('image--progress').css 'width', '100%' progressBar.appendTo element.find('.image') # This progress bar *shrinks* from full width to the right updateProgressBar: (event...

cookies_jar = ActionDispatch::Cookies::CookieJar.build(request, cookies.to_hash) cookies_jar.signed[:user_id] = 1 cookes[:user_id] = cookies_jar[:user_id] get "/movies/#{user_id}/favorite" Example: describe '/movies...

...instance use only 20GB disk space but the disk file on the server has 100GB (or even more). To resize the disk file do the following: Check storage on the...

vm $ df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 99G 19G 75G 21% / udev 2.0G 12K 2.0G 1% /dev tmpfs 396M 236K 396M 1% /run...

...feeds, carriage returns, etc. There's a TC39 proposal that's stuck in Stage 1. While there is a /m modifier in Javascript, it only changes the meaning of ^ and...

github.com

...super, initialize might be hit with this error: ArgumentError: Wrong number of arguments (given 1, expected 0) Further readings https://github.com/makandra/active_type#activetypeobject