50 Matching Annotations
  1. Last 7 days
    1. The super hacky alternative... using an error's stack trace When I got this to work I literally laughed out loud 😂. It might be the most hacky solution to a problem I've found yet
  2. May 2021
    1. Large regions of memory can be allocated without the need to be contiguous in physical memory – the IOMMU maps contiguous virtual addresses to the underlying fragmented physical addresses. Thus, the use of vectored I/O (scatter-gather lists) can sometimes be avoided.
  3. Apr 2021
    1. unbuffer disables the output buffering that occurs when program output is redirected. For example, suppose you are watching the output from a fifo by running it through od and then more.    od -c /tmp/fifo | more You will not see anything until a full page of output has been produced. You can disable this automatic buffering as follows:    unbuffer od -c /tmp/fifo | more
    1. fill_in('Foo', with: 'bar', fill_options: { clear: :backspace })

      first sighting: fill_options: { clear: :backspace })

      first sighting: fill_options as an option at all (for fill_in only, I presume)

      I wonder they added at all as a response to this:

      See also: https://hyp.is/ZcXVJJMyEeucgmPXYFP9yg/github.com/teamcapybara/capybara/issues/203

      (which key should have been pressed, backspace, space?)

  4. Mar 2021
    1. Now, if you also want deskopen to pass through any command-line parameters, you can instead use this slightly-modified version: #!/bin/sh desktop_file=$1 shift `grep '^Exec' "${desktop_file}" | sed 's/^Exec=//' | sed 's/%.//'` "$@" &
    1. Note that autosave will only trigger for already-persisted association records if the records themselves have been changed. This is to protect against SystemStackError caused by circular association validations.
    1. To achieve this, we created a small Compressor which wraps the Uglifier compressor and links the source maps so they are written to disk.
  5. Feb 2021
    1. To correct this, you can move these files to some subdirectory of ./app/assets/stylesheets or javascripts; or you can change the manifest.js to be more like how Rails with Sprockets 3 works, linking only the specific application files as top-level targets
    1. I have developed a simple pattern that copies errors from the model or the service into the form object so that the view can still use those errors
    1. Windows and Linux store their time in the BIOS differently, this will cause your clock to be desynchronized when you switch from one OS to the other. The easiest solution for it is to fix it in Linux, forcing it to work the same way as Windows. You can do this through the terminal:
    1. on the other hand, documents from different origins can still communicate using window.postMessage(), for example to implement collaborative iframe auto-resizing.
  6. Jan 2021
    1. The solution is min-width: 0; on the flex child Or min-width some actual value. Without this, the flex child containing the other text elements won’t narrow past the “implied width” of those text elements.
    1. I want to create a filter for all email sent by me only to me. To accomplish this I send all these "notes" to a permutation that I know no one else uses. E.g. john__doe@gmail.com
    1. How to wrap long word (text without spaces) in html table’s cell? This is very, very easy! We must add only a CSS proprty to table cell “td” tag – “word-break: break-all;” then all column’s widths become as intended. 
    1. use of the border-box property. If you add the following at the top of your CSS file, you should be able to avoid many of the problems inherent in using 100% width on your elements:
    1. Interesting . That feature (<slot slot="..."/>) was only recently added in #4295. It wasn't primarily intended to be used that way, but I guess it's a good workaround for this issue. I'm yet to find caveats to slotting components that way, other than it's inconvenient, as opposed to <Component slot="..."/>.
    1. Related to #1824, can do <svelte:component this={Bar}> <slot></slot> <slot name="header" slot="header"></slot> </svelte:component> <script> import Bar from './Bar.svelte'; </script> as a forwarding workaround
    1. Note: your arrow must be an HTMLElement (not an SVGElement). To use an SVG arrow, wrap it in a <div> tag with the data-popper-arrow attribute.
    1. If an element is disabled, you will need to use a wrapper element (<span> or <div>) in order for the tippy to work.
  7. Dec 2020
    1. I guess it's about "preloading" and not "navigation", if it's the case, then I guess there is still no way to attach to navigation events, and this issue should be kept open.
    2. No JS event is fired, so there currently isn't any clean way to do this that I can see.
    1. delete is a reserved word in JavaScript. To handle DELETE requests, export a function called del instead.
  8. Nov 2020
  9. Sep 2020
    1. Currently, I can only do this with some ugly JS, by wrapping the <slot> in a div and then selecting all direct children of that div (div>*). But this fix/solution also makes me face a problem: The <div> partially destroys the layout/design compared to when not using that div wrapper.
  10. Apr 2020