88 Matching Annotations
  1. Apr 2025
  2. Mar 2025
    1. he Web, sadly, defaults to 8 spaces which is an abomination for every snippet of code that would ike to be instantly readable on Mobile Phones too browsers don't provide a tab size setting anywhere (last time I've checked) to override that horrifying 8 spaces legacy nobody wants or need since tabs were invented

      a later comment shows this is incorrect; we have CSS tab-size

  3. Dec 2024
    1. There are different forms of energy, five primary forms and five secondary forms of energy, and they flow in channels in the body. And at the time of death, there, there's a certain kind of configuration of those energies that occur and you can actually, you can, in a sense, force those energies— maybe that's not the right term, but some people would agree with that metaphor— you can force those energies to enter into that configuration through various forms of yogic practices.

      for - Buddhism - Tibetan - clear light meditation practice - 5 primary and 5 secondary flows of energy in channels in the body - meditators practice a desired flow configuration at time of death - from Youtube - Between Life and Death: Understanding Tukdam - John D. Dunne

  4. Sep 2024
  5. Nov 2023
  6. May 2023
    1. The HoverBar Duo’s base is stable and heavy enough to support Apple’s biggest 12.9” iPad Pro.

      Having spent the past two days exploring the potential of the used first-generation HoverBar Duo I somehow managed to acquire for $35, I would emphasize "enough" here as a qualifier at least once over.

      Though the following is pure speculation, there were a few highly observable clues to suggest that the previous owner also had a heavy iPad Pro (perhaps a 13,9 as I have,) though - after over-tightening all the adjustment screws (all but stripping threads in the case of the one at the base,) they were ultimately not satisfied with the Duo's management of the weight, even tightened to that state.

      (Again, entirely speculative but.)

  7. Mar 2023
  8. Dec 2022
    1. The most correct thing is to create a directory with the name lua/ and inside it put all the files that will be imported by init.lua, example:

      I think to not do that, at least when just starting with NeoVim configuration.

      Instead, I would keep adding configuration in init.lua to see what happens in which order, will be easier experimenting moving things around, without behind-the-scenes loading.

      This seems a nice feature though, looking forward to leveraging it when I have some fixed parts to load.

  9. Nov 2022
    1. So when configuring Capybara, I'm using ignore_default_browser_options, and only re-use this DEFAULT_OPTIONS and exclude the key I don't want Capybara::Cuprite::Driver.new( app, { ignore_default_browser_options: true, window_size: [1200, 800], browser_options: { 'no-sandbox': nil }.merge(Ferrum::Browser::Options::Chrome::DEFAULT_OPTIONS.except( "disable-features", "disable-translate", "headless" )), headless: false, } )
    1. git_workspace/ ├── .vscode │ └── settings.json # global settings, my preferred ones ├── my-personal-projects/ │ └── project1/ │ └── .git/ └── company-projects/ ├── .vscode │ └── settings.json # local settings, overrides some of my personal ones ├── project2/ │ └── .git/ └── project3/ └── .git/
  10. Sep 2022
  11. Jul 2022
    1. ActiveSupport.on_load :active_storage_blob do def accessible_to?(accessor) attachments.includes(:record).any? { |attachment| attachment.accessible_to?(accessor) } || attachments.none? end end ActiveSupport.on_load :active_storage_attachment do def accessible_to?(accessor) record.try(:accessible_to?, accessor) end end ActiveSupport.on_load :action_text_rich_text do def accessible_to?(accessor) record.try(:accessible_to?, accessor) end end module ActiveStorage::Authorize extend ActiveSupport::Concern included do before_action :require_authorization end private def require_authorization head :forbidden unless authorized? end def authorized? @blob.accessible_to?(Current.identity) end end Rails.application.config.to_prepare do ActiveStorage::Blobs::RedirectController.include ActiveStorage::Authorize ActiveStorage::Blobs::ProxyController.include ActiveStorage::Authorize ActiveStorage::Representations::RedirectController.include ActiveStorage::Authorize ActiveStorage::Representations::ProxyController.include ActiveStorage::Authorize end

      Interesting, rather clean approach, I think

  12. Jun 2022
  13. Mar 2022
  14. Feb 2022
    1. Telegram message IDs are purely chronological from their channel/group chat’s creation – the first message in a channel or group chat is 1 and the 15th is 15. Together with the simplicity of channel/group chat IDs, which are just their alphanumeric @ names, this format makes URL schemes for Telegram message links super malleable and easy to understand.

      I’ve created a Siri Shortcut and TextExpander snippet that utilize this simplicity to make navigating to specific Telegram messages super easy.) and TextExpander snippet thathttp://insert-your-link-here.com utilize this simplicity to make navigating to specific Telegram messages super easy.

  15. Jan 2022
  16. Oct 2021
  17. Sep 2021
  18. Aug 2021
    1. In the vast majority of cases when I'm using prettier-ignore I'm only really looking to prevent it from breaking my code into new lines, whilst keeping its other transformations such as switching quotes and adding space between brackets. When ignoring single lines, fixing these formatting problems by hand is very manageable. With the ability to have Prettier ignore entire blocks of code I think the ability to specify what you want it to ignore is essential.
  19. Jul 2021
    1. (This, incidentally, is why the current 'zero-config' marketing fad is such nonsense: it really means 'abdicate the responsibility for config'. Instead of a single place where you can view all the build config in a structured, coherent form, you have the exact same amount of config but scattered around your project in lots of annoying files that are harder to understand.)
  20. Jun 2021
    1. Setting Capybara.server_port worked when the selenium integration test ran independent of other integration tests, but failed to change the port when run with other tests, at least in my env. Asking for the port number capybara wanted to use, seemed to work better with running multiple tests. Maybe it would have worked if I changed the port for all tests, instead of letting some choose on their own.
    1. app_host is used whenever you call visit to generate the url, server_host sets the ip the server should accept connections from to use (0.0.0.0 means all network interfaces) and finally server_port sets the server port (auto generated by default).You are correct in that both app and server host should be set. Could you try server_host = “0.0.0.0” and app_host = “http://rails:#{Capybara.server_port}”.

      app_host ~ server_host

  21. Apr 2021
  22. Mar 2021
  23. Feb 2021
    1. STATSD_SAMPLE_RATE: (default: 1.0)

      It's recommended to configure this library by setting environment variables.

      The thing I don't like about configuration via environment variables is that everything is limited/reduced to the string type. You can't even use simple numeric types, let alone nice rich value objects like you could if configuration were done in the native language (Ruby).

      If you try to, you get:

      ENV['STATSD_SAMPLE_RATE'] = 1
      config/initializers/statsd.rb:8:in `[]=': no implicit conversion of Integer into String (TypeError)
      
  24. Nov 2020
  25. Oct 2020
    1. To silence circular dependencies warnings for let's say moment library use: // rollup.config.js import path from 'path' const onwarn = warning => { // Silence circular dependency warning for moment package if ( warning.code === 'CIRCULAR_DEPENDENCY' && !warning.importer.indexOf(path.normalize('node_modules/moment/src/lib/')) ) { return } console.warn(`(!) ${warning.message}`) }
  26. Sep 2020
    1. The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.

      This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.

      React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.

  27. Jun 2020
  28. May 2020
  29. Apr 2020
  30. Mar 2020
  31. Feb 2020
    1. CAC Isn’t Shipping Apps With Configs A shallow reading of configuration as code might lead you to add a configs folder to your release package and throw in the files. That approach would be wrong and dangerous. That solution means that a configuration change requires a release of the application. This meets the goal of adding an audit trail for configs but muddies the water by mixing them with code changes. If a new feature requires both a code and configuration change, this might make sense. But what if you’re only changing the configuration? What if you’re just increasing a cache setting in production?
  32. Dec 2019
  33. Nov 2019
    1. File-relative configuration Babel loads .babelrc (and .babelrc.js / .babelrc.cjs / package.json#babel) files by searching up the directory structure starting from the "filename" being compiled (limited by the caveats below). This can be powerful because it allows you to create independent configurations for subsections of a package. File-relative configurations are also merged over top of project-wide config values, making them potentially useful for specific overrides, though that can also be accomplished through "overrides".
  34. Oct 2019
    1. Setting up Nginx properly requires quite a bit of work. Using websockets or using Rails streaming? Make sure you disable response buffering for the relevant URIs, otherwise they won’t work correctly. Phusion Passenger 5’s builtin reverse proxy does the right thing by default, without any configuration. In other words: it’s all about making things simple.
  35. Aug 2019
  36. Dec 2017
  37. Sep 2017
  38. Jan 2014