193 Matching Annotations
  1. Jun 2025
  2. May 2025
  3. Apr 2025
  4. Mar 2025
  5. Feb 2025
    1. Last, but not least, we have our own extensions to the language. As explained in the previous post on this series, this is code that could be part of the language but, for some reason, it’s not. In the case of PHP we can think, for example, of a DateTime class based on the one provided by PHP but with some extra methods. Another example could be a UUID class, which although not provided by PHP, it is by nature very aseptic, domain agnostic, and therefore could be used by any project independently of the Domain.
  6. Sep 2024
  7. May 2024
    1. # This is manual way to describe complex parameters parameter :one_level_array, type: :array, items: {type: :string, enum: ['string1', 'string2']}, default: ['string1'] parameter :two_level_array, type: :array, items: {type: :array, items: {type: :string}} let(:one_level_array) { ['string1', 'string2'] } let(:two_level_array) { [['123', '234'], ['111']] }
  8. Feb 2024
  9. Dec 2023
  10. 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...

  11. Sep 2023
  12. 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.
  13. Apr 2023
  14. Mar 2023
  15. Feb 2023
  16. Jan 2023
  17. Dec 2022
  18. Nov 2022
  19. Oct 2022
  20. Sep 2022
  21. 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.
  22. Jun 2022
  23. May 2022
  24. Mar 2022
  25. Feb 2022
  26. Nov 2021
  27. Jul 2021
  28. Jun 2021
  29. 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.
  30. Apr 2021
  31. Mar 2021
    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')
      
  32. Feb 2021
  33. Jan 2021
  34. 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.

  35. Oct 2020
  36. 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.

  37. Jul 2020
  38. Jun 2020
  39. 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.
  40. Apr 2020
  41. Mar 2020
    1. On top of standard Markdown blockquotes, which require prepending > to quoted lines, GFM supports multiline blockquotes fenced by >>>:

      First sighting of this >>>. I like it! It's always a pain to paste in a quote and then have to manually prefix every line with >, esp. if there are many lines.

      I also like that it very nicely parallels the multilne code block delimeter syntax.

    1. This is where the incredibly useful gettext filter comes in. If you take a peek at your plugin's code you'll see strings like this: .gist table { margin-bottom: 0; } <?php _e( 'Related Products', 'woocommerce' ); ?> view raw sample-translatable-string.php hosted with by GitHub You can easily translate these strings by adding a filter to your functions.php file: .gist table { margin-bottom: 0; } <?php /** * Change text strings * * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext */ function my_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Related Products' : $translated_text = __( 'Check out these related products', 'woocommerce' ); break; } return $translated_text; } add_filter( 'gettext', 'my_text_strings', 20, 3 );
  42. Jan 2020
  43. Dec 2019
  44. Nov 2019
  45. Oct 2019
  46. Aug 2019
  47. Feb 2019
  48. Oct 2018
  49. Sep 2017
  50. Aug 2017
    1. 6.2 Extension IDs Each extension has an extension ID that follows the browserext:// protocol. For example browserext://MyExtension_c1wakc4j0nefm/options.html browserext://dfcijpibodeoenkablikbkiobbdnkfki/options.html The algorithms that generate these IDs are different for each browser. To access these resources, do not hardcode the ID generated by a particular browser. Instead, use the runtime.getURL() method to convert a relative file name or path to the absolute name or path, which includes the extension ID.

      Vivaldi, as you know, I love your browser and use it primary and multiple times a day, despite it's quirks deviating from Chrome.

      Having said this, can we eliminate the generated file names for extensions, screenshots, and notes?

  51. Apr 2016
  52. Oct 2015
  53. Aug 2015
    1. This section defines three signature algorithms based on the RSA encryption process described in Sections 8 and 9. The intended use of the signature algorithms is in signing X.509/PEM certificates and certificate-revocation lists, PKCS #6 extended certificates, and other objects employing digital signatures such as X.401 message tokens. The algorithms are not intended for use in constructing digital signatures in PKCS #7. The first signature algorithm (informally, "MD2 with RSA") combines the MD2 message-digest algorithm with RSA, the second (informally, "MD4 with RSA") combines the MD4 message-digest algorithm with RSA, and the third (informally, "MD5 with RSA") combines the MD5 message-digest algorithm with RSA.

      See http://security.stackexchange.com/questions/10706/encode-der-with-openssl for a high level overview of the signing process

    1. On both platforms, your custom JavaScript class can define a run() function that Safari invokes as soon as it loads the JavaScript file. In the run() function, Safari provides an argument named completionFunction, with which you can pass results to your app extension in the form of a key-value object. In iOS, you can also define a finalize() function that Safari invokes when your app extension calls completeRequestReturningItems:completion: at the end of its task. A finalize() function can use items your extension passes in completeRequestReturningItems:completion: to change the webpage as desired.
    1. When we first set out to identify malicious extensionsour expectation was to find banking trojans and pass-word stealers that duplicated the strategies pioneered byZeus and SpyEye. In practice, the abusive extensionecosystem is drastically different from malicious bina-ries. Monetization hinges on direct or indirect relation-ships with syndicated search partners and ad injection af-filiate programs, some of which earn millions of dollarsfrom infected users [37]. Miscreants derive wealth fromtrafficanduser targetingrather than the computing re-sources or privileged access mediated via the browser. Itmay simply be that the authors of malicious binaries havelittle incentive (or external pressure) to change, leavingextensions to a distinct set of actors. This uncertainty isa strong motivation for exploring the extension ecosys-tem further.

      This is the section that identifies the motives and economics around malicious extensions