178 Matching Annotations
  1. Last 7 days
    1. building a robust Chrome extension that effortlessly captures full-page screenshots, providing users with a seamless and enhanced browsing experience.
  2. Dec 2023
  3. Nov 2023
    1. ActiveRecord::Base.normalizes declares an attribute normalization. The normalization is applied when the attribute is assigned or updated, and the normalized value will be persisted to the database. The normalization is also applied to the corresponding keyword argument of query methods, allowing records to be queried using unnormalized values.

      Guess I don't need to use mdeering/attribute_normalizer gem anymore...

  4. Sep 2023
  5. Jun 2023
    1. I’ve heard-suggested that ActiveSupport, which does a ton of monkey-patching of core classes, would make potentially-nice refinements. I don’t hold this opinion strongly, but I disagree with that idea. A big value proposition of ActiveSupport is that it is “omnipresent” and sets a new baseline for ruby behaviors - as such, being global really makes the most sense. I don’t know that anyone would be pleased to sprinkle using ActiveSupport in all their files that use it - they don’t even want to THINK about the fact that they’re using it.
  6. Apr 2023
  7. Mar 2023
  8. Feb 2023
    1. Rack::Session was moved to a separate gem. Previously, Rack::Session was part of the rack gem. Not every application needs it, and it increases the security surface area of the rack, so it was decided to extract it into its own gem rack-session which can be updated independently.
  9. Jan 2023
    1. But it does not work, because the association with authors will return empty authors for the Material as the materials are also soft deleted.
    2. The problem is that Globalize knows nothing about acts_as_paranoid. You can delete a Material, and it should delete the translations, but when you try to recover the Material then there is an error because of how the translations are implemented and the order in which the translations and the Material are recovered. Which record should be recovered first?
    3. Remember that the Material has all of its translations for the title in a table that just got soft deleted. So the correct answer is “nil”. The title of the delete material is nil.
  10. Dec 2022
  11. Nov 2022
  12. Oct 2022
  13. Sep 2022
  14. Aug 2022
    1. I created a gem called rspec_n that installs an executable that will do this. It will re-run the test suite N times by default. You can make it stop as soon as it hits a failing iteration via the -s cli option. It will display other stats about the iterations as well.
  15. Jun 2022
  16. May 2022
  17. Mar 2022
  18. Feb 2022
  19. Nov 2021
  20. Jul 2021
    1. This looks like a bookmarking service that is billing itself as a digital commonplace book. I'm not sure about the digital ownership aspect, but it does have a relatively pretty UI.

      Looks like it works via a Chrome extension: https://chrome.google.com/webstore/detail/commonplaces-your-digital/ckiapimepnnpdnoehhmghgpmiondhbof

  21. Jun 2021
  22. May 2021
    1. The NoScript extension for Firefox mitigates CSRF threats by distinguishing trusted from untrusted sites, and removing authentication & payloads from POST requests sent by untrusted sites to trusted ones. The Application Boundary Enforcer module in NoScript also blocks requests sent from internet pages to local sites (e.g. localhost), preventing CSRF attacks on local services (such as uTorrent) or routers.
    2. The Self Destructing Cookies extension for Firefox does not directly protect from CSRF, but can reduce the attack window, by deleting cookies as soon as they are no longer associated with an open tab.
  23. Apr 2021
  24. Mar 2021
    1. _Underline_

      I really like that they allow this. How come most other Markdown flavors (including GitHub, GitLab) don't provide a way to underline text?

    1. # Parallel Ruby universes ("Rubyverses") - A proposed interface for # parallel, "semi-private" method or method-and-data spaces via # "closely associated" objects.
    1. A proposal to specify the path for bury with classes as values of a hash arg: {}.bury(users: Array, 0 => Hash, name: Hash, something: 'Value') # {user: [{name: {something: 'Value'}]} So all absent nodes could be created via klass.new

      Didn't understand it at first, but now I think it's a pretty clever/decent solution.

      Just a bit more verbose than one might like...

      At first I had reservations about the fact that this requires you to pass a hash ... or rather, once you start using a hash as your "list", you can't just "switch back" to an array (a "problem" I've noticed in RSpec, where you have some tags that are symbols, and some that are hashes: you have to list the symbols first: describe 'thing', :happy_path, driver: :chrome):

      {}.bury(users: Array, 0, 'Value')
      

      But I think that's okay in practice. Just use a hash for all "elements" in your list:

      {}.bury(users: Array, 0 => 'Value')
      
    1. For pluggability, an endpoint is split into a Protocol and an Adapter part. This separates generic logic from environment-dependent code.
    2. Note how a handful of default steps lead into six standardized termini, allowing to plug protocols into different adapters. Imagine replacing your self-written API adapter with a canonical JSON-API adapter, for example.
  25. Feb 2021
  26. Jan 2021
  27. Dec 2020
    1. website developers and extension authors

      Like, for example, Google having a problem with ad-blockers in Google Chrome. This is an example of why monopolies aren't great; Google makes money selling ads but they also control a browser that most people use. There's a conflict here when the users of the browser install extensions that limit Google's ability to show you ads.

  28. Oct 2020
    1. The problem is that the since both the JSX transpiler and the traceur compiler are actually parsing the full javascript AST, they would have to mutually agree on the syntax extensions you use: traceur can't parse the faux-xml syntax JSX adds, and JSX can't parse the async or await keywords, for example, or generator functions.
  29. Sep 2020
    1. In '07, safety implied an unacceptable performance hit on slow single-core devices with 128MiB of RAM.

      In 2007, safety implied an unacceptable performance hit for hosting extensions, on devices with one core and 128MiB ram. In 2020, the lack of extensions is the ultimate app-ification of the web, the reduction of the web into a useless, powerless medium where users have no control.

  30. Jul 2020
    1. require 'set' class Array def uniq_elements(&prc) prc ||= ->(e) { e } uniques, dups = {}, Set.new each do |e| k = prc[e] ((uniques.key?(k)) ? (dups << k; uniques.delete(k)) : uniques[k] = e) unless dups.include?(k) end uniques.values end end
  31. Jun 2020
  32. May 2020
    1. 1. Disabling concrete extension update. That's what I wanted! You can do this by editing the extensions manifest json-file on Windows: C:\Users\<USERNAME>\AppData\Local\Google\Chrome\User Data\Default\Extensions\<EXTENSION-ID>\<VERSION>\manifest.json (find out the extensions ID by enabling developer mode in the extension settings page) on Ubuntu for Chromium: ${HOME}/.config/chromium/Default/Preferences In this file set "update_url" property to something invalid like "https://localhost" for example. For now according to given url updating of that extension is simply impossible.
    1. I believe that beginning to distribute tools that patch Firefox and give back power to users and allow them to install unsigned extensions is necessary when an organization is taking away our rights without giving us a compelling reason for doing so.
    2. The other pressing issue is that users have lost the right to run private extensions in the release version of Firefox, without needing to hand over their source code to Mozilla.
    1. I would like to know if you know a way to load unsigned extensions without requiring a developer or unbranded version of Firefox.
    2. To load one temporarily go to about:debugging, "This Firefox" and click "Load temporary add-on from file". More permanently: many (most?) Linux distributions allow unsigned extensions to be placed in /usr/lib/firefox/browser/extensions/ and they will automatically be loaded, provided they have valid names (e.g. dodgy@unsignedextension.com.xpi).
    1. Add-ons that are intended for internal or private use, are only accessible to a closed user group, or for distribution testing may not be listed on AMO. Such add-ons may be uploaded for self-distribution instead.
  33. Apr 2020
  34. Mar 2020
  35. hub.k3integrations.com