112 Matching Annotations
  1. Jan 2024
    1. The model of Spotify in particular - paid tier alongside a free tier with ads - seems like the simplest sustainable solution I see. Having paid features is the most obvious way to make money, but you want to enable adoption as much as you can. It's the same idea as companies dangling "free trial" in front of you at every turn - in a competitive environment, you want to remove barriers for users to try your product or service. This is essentially the idea of a "loss leader" for a grocery store, or any business really.
  2. Oct 2023
    1. Now, you can add <hr> (horizontal rule) elements into the list of select options and they will appear as separators to help visually break up the options
      <div itemscope itemtype="http://schema.org/Code"> ```html <label for="major-select">Please select a major:</label> <br/> <select name="majors" id="major-select"> <option value="">Select a major</option>
      <option value="arth">Art History</option> <option value="finearts">Fine Arts</option> <option value="gdes">Graphic Design</option> <option value="lit">Literature</option> <option value="music">Music</option>
      <option value="aeroeng">Aerospace Engineering</option> <option value="biochemeng">Biochemical Engineering</option> <option value="civileng">Civil Engineering</option> <option value="compeng">Computer Engineering</option> <option value="eleng">Electrical Engineering</option> <option value="mecheng">Mechanical Engineering</option> </select> ``` </div>
  3. Sep 2023
    1. use the services of free email providers (Gmail, Live, Yahoo...) which are limited and your data is used for commercial purposes. Install your own email server, which requires important technical knowledge to setup and configure the system.
  4. Aug 2023
    1. async is a concurrency technique. If you need concurrency, async is required for node to work properly (not "better"). If you don't have concurrency, you don't need async. The point is you need to actually understand what async does for you and why. It's not inherently "better" for no reason and you don't need to memorize it as a "best practice". If the OP is writing a command line utility to alter a JSON file then exit, async complicates the code for no reason as the concurrency is not required.
    1. Now you have three options:Directly send scheduled or recurring emails using Courier: Call the sendEnhancedNotification() function from the Courier PHP SDK, and use a third party task scheduling library called Crunz to deal with the scheduling side of things. This works using cron syntax, so the same principle can be used for scheduled or recurring emails.Use Courier’s automations to add send logic to your scheduled emails: An automation in Courier is a way of chaining together different steps such as the sending of emails (or other notification-related logic) so that the steps happen in a particular order. An automation can be run by calling the invokeAutomation()function, and as with option 1, you can use Crunz to deal with the scheduling.Using Courier’s no-code automations designer: This is a no-code GUI tool in the Courier UI that uses a drag-and-drop canvas to build up your notification logic. It contains some more advanced logic than option 2 (such as the ability to create email digests or batching).
  5. May 2023
    1. But you should also keep track of the email address that they signed up with in a case sensitive fashion. Any time you send an email to them, be sure to send it with that original casing. This allows the email server to handle it however it feels like it needs to. So even though the person may always be signing in to your site with steve@example.com, if they signed up as Steve@example.com, you'll always send email to Steve@example.com, just to be safe.
  6. Apr 2023
  7. Jan 2023
    1. I've worked with and have helped maintain paranoia for a while. I'm convinced it does the wrong thing for most cases. Paranoia and acts_as_paranoid both attempt to emulate deletes by setting a column and adding a default scope on the model. This requires some ActiveRecord hackery, and leads to some surprising and awkward behaviour.
    1. The solution is pretty simple. In the MaterialsController just show all the materials that do not have a :deleted_at column set. In the MaterialsTrashController just show only the Materials with :delete_at controller. I can solve the whole problem with one simple filter that would take me like 1 minute to implement. We don’t need any of the problems above. They simply will not exist.
  8. Dec 2022
    1. Projects like Kompose or Okteto Stacks show how the simpler Compose model can be translated into Kubernetes API payloads
  9. Apr 2022
  10. Mar 2022
    1. The Moment team has discussed these issues at length. We recognize that many existing projects may continue to use Moment, but we would like to discourage Moment from being used in new projects going forward. Instead, we would like to recommend alternatives that are excellent choices for use in modern applications today.
  11. Dec 2021
  12. Nov 2021
    1. La seconde consiste à recevoir les élèves en groupe (6 en 30 minutes) devant tous les professeurs. Dans cette modalité, on peut ne pas faire de réunion préparatoire en présentiel entre professeurs (mais une harmonisation et lecture des avis de chacun est nécessaire). Temps pour 24 élèves : 2h
  13. Oct 2021
  14. Sep 2021
    1. hen patients are asked how their sleep problems started, they’ll typically mention some “stressful event or a big change in their life as a thing that sort of got them off track,” Martin said. “Short-term insomnia is how long-term insomnia starts.”

      to the fact that everything was closing everyone's world got turned around.

    2. The pandemic made matters worse. In one study conducted across 49 countries in March and April 2020, 40 percent of people said their sleep was worse than before the pandemic. Participants’ use of sleeping pills increased by 20 percent.

      in my option they should turn off the new.

  15. Aug 2021
    1. some 60% of all single-stock options trading recently has been in those with less than two weeks until expiration, compared with 45% at the start of 2020

      One way to identify retail investors

  16. Jul 2021
  17. Jun 2021
    1. We should think about the number of simultaneous connections (peak and average) and the message rate/payload size. I think, the threshold to start thinking about AnyCable (instead of just Action Cable) is somewhere between 500 and 1000 connections on average or 5k-10k during peak hours.
      • number of simultaneous connections (peak and average)

      • the message rate/payload size.

    1. while (( "$#" )); do case "$1" in -a|--my-boolean-flag) MY_FLAG=0 shift ;; -b|--my-flag-with-argument) if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then MY_FLAG_ARG=$2 shift 2 else echo "Error: Argument for $1 is missing" >&2 exit 1 fi ;; -*|--*=) # unsupported flags echo "Error: Unsupported flag $1" >&2 exit 1 ;; *) # preserve positional arguments PARAMS="$PARAMS $1" shift ;; esacdone# set positional arguments in their proper placeeval set -- "$PARAMS"
  18. May 2021
    1. Also, it is definitely NOT okay to recommend --force on forums, Q&A sites, or in emails to other users without first carefully explaining that --force means putting your repositories’ data at risk. I am especially bothered by people who suggest the flag when it clearly is NOT needed; they are needlessly putting other peoples' data at risk.
  19. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

  20. Mar 2021
    1. I don't use remote editing much so vim-dirvish is powerful enough to manage my workflow (It's actually faster than netrw ~ the author claims 2x, I feel it's faster than that - it's really instantaneous ⚡) very useful on large codebase/repositories
    2. I was searching for a solution to this problem too since I actually removed netrw from being loaded in vim completely and replace it with vim-dirvish. This plugin has around 500~ LOC, compared to netrw's (11,000+ LOC).
    1. The elimination of what is arguably the biggest monoculture in the history of software development would mean that we, the community, could finally take charge of both languages and run-times, and start to iterate and grow these independently of browser/server platforms, vendors, and organizations, all pulling in different directions, struggling for control of standards, and (perhaps most importantly) freeing the entire community of developers from the group pressure of One Language To Rule Them All.
    2. JavaScript needs to fly from its comfy nest, and learn to survive on its own, on equal terms with other languages and run-times. It’s time to grow up, kid.
    3. If JavaScript were detached from the client and server platforms, the pressure of being a monoculture would be lifted — the next iteration of the JavaScript language or run-time would no longer have to please every developer in the world, but instead could focus on pleasing a much smaller audience of developers who love JavaScript and thrive with it, while enabling others to move to alternative languages or run-times.
    1. Maybe it would be simple to always add that line, and always shift the source maps by 1.
    2. This semi-colon is added to prevent changing the code behaviour (the famous line ending with parentheses, etc) Most people will use a JS minifier If they don't, a single extra character is unlikely to change much If I'm right about all the above: Why don't we simply always add a semi-colon regardless of what the file ends with?
    1. I’d say if the form is short and an obvious pattern (like sign up or log in), you could use the placeholder visual pattern, but use real labels instead.
  21. Feb 2021
    1. but if you were previously using regexp or proc values, they won't work at all with Sprockets 4, and if you try you'll get an exception raised that looks like NoMethodError: undefined method 'start_with?'
    1. @adisos if reform-rails will not match, I suggest to use: https://github.com/orgsync/active_interaction I've switched to it after reform-rails as it was not fully detached from the activerecord, code is a bit hacky and complex to modify, and in overall reform not so flexible as active_interaction. It has multiple params as well: https://github.com/orgsync/active_interaction/blob/master/spec/active_interaction/modules/input_processor_spec.rb#L41

      I'm not sure what he meant by:

      fully detached from the activerecord I didn't think it was tied to ActiveRecord.

      But I definitely agree with:

      code is a bit hacky and complex to modify

    1. I find reform's implementation a bit too complicated too (lots of layers of abstraction, including going through the representable gem for a lot of things)
    2. If you compare the code of Reform and the code of ActiveForm-Rails, I think the last is more simple and clear for a behavior similar (or better).
    3. Finally, I really do something simple and I find the reform's implementation is a little bit too complicated for what I want. I think my code (and yours) is simple.
  22. Jan 2021
  23. atomiks.github.io atomiks.github.io
    1. Can I use the title attribute?Yes. The content prop can be a function that receives the reference element as an argument and returns a string or element.tippy('button', { content(reference) { const title = reference.getAttribute('title'); reference.removeAttribute('title'); return title; }, });The title attribute should be removed once you have its content so the browser's default tooltip isn't displayed along with the tippy.
    1. Headless: With React's DOM rendering for improved usage with CSS-in-JS and spring libraries. If you want greater control over your poppers to integrate fully with design systems, this is for you.
    1. We can make content a function that receives the reference element (button in this case) and returns template content:
    2. You can pass the element itself, which is useful for keeping event listeners attached (or when a framework is controlling elements inside):
    3. Allows you to separate the tippy's positioning from its trigger source.
  24. Dec 2020
    1. Less developer maintenance burden: The existing (Kuma) platform is complex and hard to maintain. Adding new features is very difficult. The update will vastly simplify the platform code — we estimate that we can remove a significant chunk of the existing codebase, meaning easier maintenance and contributions.
  25. Nov 2020
    1. My focus is on make the API as simpler as possible to allows easy integration without even reading the docs but keeping and expand current features.
    2. There are actually 3 other libraries that implements material in svelte, i hope this to become the community favorite because using MDC underneath it implements correctly Material guidelines.
    3. This sort of library probably should be communitized so there's really just a single library.
    1. However, this coalescing was very complicated, both in the specification and implementations, due to the dynamism of computed property names for accessors. Coalescing was a big source of overhead (e.g., in terms of code size) in polyfill implementations of "Stage 2" decorators.
  26. Oct 2020
  27. Sep 2020
    1. For the past couple of years in particular however, I’ve stopped using Webpack to develop them, opting instead to use Rollup as my primary bundler for apps.
    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
  28. Aug 2020
    1. Changing Major or Option Students seeking to change majors/options must be able to complete the new major/option within 140 units. Student requests to change a major/option must be approved by the department chair of the new major/option. If the student has 90 or more earned units, the request also must be approved by the associate dean of the new major/option. Requests to change majors/options must be accompanied by a plan demonstrating that the new major/option can be completed within 140 units.

      CSUN students must read the content of this page before contacting their academic advisor.

    1. 5.1.7. NixOS / nixpkgs option handling

      What is an option?

      From the link below to the source, it's just an attribute set with all the function parameters (see below) plus a _type attribute name to allow for type level operations (because Nix is untyped).

        mkOption =
          {
          # Default value used when no definition is given in the configuration.
          default ? null,
          # Textual representation of the default, for the manual.
          defaultText ? null,
          # Example value used in the manual.
          example ? null,
          # String describing the option.
          description ? null,
          # Related packages used in the manual (see `genRelatedPackages` in ../nixos/lib/make-options-doc/default.nix).
          relatedPackages ? null,
          # Option type, providing type-checking and value merging.
          type ? null,
          # Function that converts the option value to something else.
          apply ? null,
          # Whether the option is for NixOS developers only.
          internal ? null,
          # Whether the option shows up in the manual.
          visible ? null,
          # Whether the option can be set only once
          readOnly ? null,
          # Deprecated, used by types.optionSet.
          options ? null
          } @ attrs:
          attrs // { _type = "option"; };
      

      How does it fit in a big scheme of things?

      ?

  29. Jul 2020
  30. Jun 2020
  31. May 2020
    1. This is it. I'm done with Page Translator, but you don't have to be. Fork the repo. Distribute the code yourself. This is now a cat-and-mouse game with Mozilla. Users will have to jump from one extension to another until language translation is a standard feature or the extension policy changes.
    2. Mozilla will never publicly ask users to circumvent their own blocklist. But it's their actions that are forcing people to do so.
    3. So to me, it seems like they want to keep their users safer by... making them use Google Chrome or... exposing themselves to even greater danger by disabling the whole blocklist.
    4. You might try this extension: https://github.com/andreicristianpetcu/google_translate_this It does the same thing in the same way as Page Translator and likely will be blocked by Mozilla, but this is a cat and mouse game worth playing if you rely on full-page in-line language translation.
  32. Apr 2020
    1. minitest doesn't reinvent anything that ruby already provides, like: classes, modules, inheritance, methods. This means you only have to learn ruby to use minitest and all of your regular OO practices like extract-method refactorings still apply.
    1. Don't use it! Writing simple assertions (and Minitest way of transforming them to expectations) is almost always a better idea anyway. Work with your favourite library authors to start with assertions and add matchers for convenience and not the other way around. Keep it simple.
  33. Mar 2020
    1. GNU gettext is designed to minimize the impact of internationalization on program sources, keeping this impact as small and hardly noticeable as possible. Internationalization has better chances of succeeding if it is very light weighted, or at least, appear to be so, when looking at program sources.
  34. Dec 2019
    1. So many power users try dozens of complicated todo list software applications, only to go right back to their trusty todo.txt file.

      How true. I've found that to be true as well.

    1. I've always thought that the Gentoo way of installing a new system (from backup or otherwise) was the best due to its simplicity.
    1. There are many options for performing backups. Most Linux distributions are provided with one or more open source programs specially designed to perform backups. There are many commercial options available as well. But none of those directly met my needs so I decided to use basic Linux tools to do the job.
  35. Nov 2019
    1. Some time ago I asked on Reddit: “What’s the consensus among the React community for testing React components?” Shawn Wang replied: “testing is an enormously complicated and nuanced topic on which there isn’t a consensus anywhere in JS, much less in React.” I was not trying to find the best library for testing React. Mainly because there isn’t one.
  36. Oct 2019
  37. Nov 2017