- Apr 2024
-
forums.mozillazine.org forums.mozillazine.org
-
Ain't it possible that every message I send or forward will just be replaced to the outbox and will be send by Thunderbird in the background ? I really hate it that every message sends itself away, running on top of all other windows, and it makes me wait till it has been sent from reading my other messages...
-
- Jan 2024
-
www.ruby-forum.com www.ruby-forum.com
-
How to use “case” to match class names? (=== not so funny)
-
-
mattbrictson.com mattbrictson.com
-
But what if you want to reuse one layout within another?
-
- Aug 2023
-
github.com github.com
-
rendered.should have_selector("#header") do |header| header.should have_selector("ul.navlinks") end Both of which silently pass - however, capybara doesn't support a :content option (it should be :text), and it doesn't support passing blocks to have_selector (a common mistake from Webrat switchers).
-
- Jul 2023
-
stackoverflow.com stackoverflow.com
-
expect(described_class.active).not_to include_any_of [records_not_to_be_included]
-
-
www.codewithjason.com www.codewithjason.com
-
I commonly find myself wanting to assert that a certain field contains a certain value.
-
- Nov 2022
-
stackoverflow.com stackoverflow.com
-
I have DNS settings in my hosts file that are what resolve the visits to localhost, but also preserve the subdomain in the request (this latter point is important because Rails path helpers care which subdomain is being requested)
-
I've developed additional perspective on this issue - I have DNS settings in my hosts file that are what resolve the visits to localhost, but also preserve the subdomain in the request (this latter point is important because Rails path helpers care which subdomain is being requested) To sum up the scope of the problem as it stands now - I need a way within Heroku/Capybara system tests to both route requests to localhost, but also maintain the subdomain information of the request. I've been able to accomplish one or the other, but haven't found a configuration that provides both yet.
-
-
stackoverflow.com stackoverflow.com
-
session = ActionDispatch::Integration::Session.new(Rails.application) response = session.post("/mypath", my_params: "go_here")
worked for me
-
-
stackoverflow.com stackoverflow.com
-
Check the "Auto-open DevTools for popups".
Without this feature, when a pop-up opens without DevTools open, if it redirects, it will be too late to open DevTools and see the redirect logged...
There is still a problem though: If the pop-up window closes, so does that DevTools. So you can't see logs or network logs (redierects) that happened right before it closed...
-
- Sep 2021
-
stackoverflow.com stackoverflow.com
-
Can you make Svelte create an open shadowRoot? You can then move it yourself (client-side)
-
-
www.systutorials.com www.systutorials.com
-
Scripts for disabling/enabling laptop keyboard
-
- Mar 2021
-
askubuntu.com askubuntu.com
- Jul 2020
-
github.com github.com
-
I'll freely admit I was surprised by this behavior myself since I needed to obtain an Array with only one instance of each item in the argument array removed.
-
- Jun 2020
-
stackoverflow.com stackoverflow.com
-
What would be nice is if JavaScript had a built-in way to do what I can do in Ruby with:
> I18n.interpolate('Hi, %{name}', name: 'Fred') => "Hi, Fred"
But to be fair, I18n comes from i18n library, so JS could just as easily (and I'm sure does) have a library that does the same thing.
Update: Actually, you can do this in plain Ruby (so why do we even need
I18n.interpolate
?):main > "Hi, %{name}" % {name: 'Fred'} => "Hi, Fred"
main > ? String#% From: string.c (C Method): Owner: String Visibility: public Signature: %(arg1) Number of lines: 9 Format---Uses str as a format specification, and returns the result of applying it to arg. If the format specification contains more than one substitution, then arg must be an Array or Hash containing the values to be substituted. See Kernel::sprintf for details of the format string. "%05d" % 123 #=> "00123" "%-5s: %016x" % [ "ID", self.object_id ] #=> "ID : 00002b054ec93168" "foo = %{foo}" % { :foo => 'bar' } #=> "foo = bar"
I guess that built-in version is fine for simple cases. You only need to use
I18n.translate
if you need its more advanced features likeI18n.config.missing_interpolation_argument_handler
.
-
-
stackoverflow.com stackoverflow.com
-
If anyone else wonders How to just get data type of a varible (not column) you can use the pg_typeof(any) function.
-
- May 2020
-
stackoverflow.com stackoverflow.com
-
I have used this bash one-liner before set -- "${@:1:$(($#-1))}" It sets the argument list to the current argument list, less the last argument.
Analogue of
shift
built-in. Too bad there isn't just apop
built-in.
-