77 Matching Annotations
  1. Jan 2024
    1. Board view Subtasks are shown slightly indented from the main task Subtasks can be dragged out of the parent task to a new list to indicate their status. For subtasks with a different status to their parent, it displays a dummy parent (ghosted), above the subtask in the list, with the parent's status label visible against the dummy. Dragging the parent task to a different list changes the label of the child tasks as well, and any sub tasks already in its new list are re-organised under the parent and any dummy removed
    1. Agree. I have 3 seconds of silence as my ringtone. Been using that since I had a clamshell phone. Everyone in my contacts list has a custom ringtone so they will ring. Anyone I don't know won't ring and if it is important they'll leave a message. Spammers usually don't leave messages.

  2. Dec 2023
    1. With all the solar panels in the world linked up, the daylight side of the planet could power the night side ad infinitum, Ingels suggested.
      • for: good idea - one global grid for renewables
    1. Rupert Read has the best idea I have heard re international climate negotiations: countries that are serious should have their own conference where they collaborate on strong targets, plans, etc. Part of which should be recognising the dangers of remaining reliant on the petrostates, planning to transcend that reliance and sanctioning them
      • for: good idea - COP alternative, COP alternative - coalition of the willing, COP alternative - social tipping point, Rupert Read - alternative to COP

      • good idea: COP alternative

        • This could work based on the principle of social tipping points
        • The current COP pits the powerful incumbents of the old system delaying as long as possible rapid system change, these are the conservatives
          • This puts the liberals at distinct disadvantage from the conservatives because in a consensus reached agreement, the conservatives can veto any strong and binding language that represents rapid system change
        • In an alternative conference where the 100+ nation states are already in agreement, action in this smaller coalition OF THE WILLING, will lead to rapid action.
        • This could lead to breaking the threshold of system change via reaching the 25% social tipping point threshold
      • question: alternative COP

        • If an alternative COP was held, is the nation state the best level to approach?
        • What about a city level COP?
      • reference

  3. Nov 2023
    1. A personalized button reminds end users that they have used Sign in with Google before, and thus helps to prevent unnecessary duplicate account creation on your website. This is especially helpful to end users who visit your website only occasionally. They may forget the login methods they used.
    1. This is a shell script that essentially does the same as the flaky test: #!/bin/sh cat <<EOS > m.rb module M sleep 0.5 def self.works? true end end EOS ruby -I. <<EOS autoload :M, "m" t = Thread.new { M } p M.works? EOS rm m.rb

      Same thing in another language....

  4. Jul 2023
    1. The distinction doesn't refer to the files _contents_ but how to the file is _treated_ when it is being read or written. In "rb"/"wb" modes files are left how they are, in "r"/"w" modes Windows programmers get line ends "\r\n" translated into "\n" what disturbs file positions and string lengths.
  5. Jun 2023
    1. Another point is that properties are good in that you can place breakpoints in them to capture getting/setting events and find out where they come from.
  6. May 2023
    1. I know this is an old question but I just want to comment here: To any extent email addresses ARE case sensitive, most users would be "very unwise" to actively use an email address that requires capitals. They would soon stop using the address because they'd be missing a lot of their mail. (Unless they have a specific reason to make things difficult, and they expect mail only from specific senders they know.) That's because imperfect humans as well as imperfect software exist, (Surprise!) which will assume all email is lowercase, and for this reason these humans and software will send messages using a "lower cased version" of the address regardless of how it was provided to them. If the recipient is unable to receive such messages, it won't be long before they notice they're missing a lot, and switch to a lowercase-only email address, or get their server set up to be case-insensitive.
  7. Mar 2023
    1. Why the 2 separate steps for this? Simple: to make things easier on the front-end side of things. Sending 2 different error codes, one for when the OTP is required but missing, and one where the OTP was provided but invalid, allows us to adjust our login UI accordingly.
  8. Feb 2023
    1. There should thus be an option to give npm a list of vulnerability IDs (CVEs etc.) that it does not need to defend because the admin has decided it does not apply to their edge case.

      should be optional

  9. Jan 2023
    1. belongs_to does not ensure reference consistency, so depending on the use case, you might also need to add a database-level foreign key constraint on the reference column, like this: create_table :books do |t| t.belongs_to :author, foreign_key: true # ... end
  10. Dec 2022
    1. The target of the POST action is the same as the one in the GET action for a manual unsubscription, so this is intended to allow the same server code to handle both.
  11. Sep 2022
    1. Why not use map, which we already have for collections? Generally speaking, the map function isn't just about collections (though that's usually how it's used in Ruby). map is more about putting an object in a context (a block in Ruby's case), modifying the object, and returning the modified object.
  12. Jul 2022
    1. Stop autoclosing of PRs While the idea of cleaning up the the PRs list by nudging reviewers with the stale message and closing PRs that didn't got a review in time cloud work for the maintainers, in practice it discourages contributors to submit contributions. Keeping PRs open and not providing feedback also doesn't help with contributors motivation, so while I'm disabling this feature of the bot we still need to come up with a process that will help us to keep the number of PRs in check, but celebrate the work contributors already did instead of ignoring it, or dismissing in the form of a "stale" alerts, and automatically closing PRs.

      Yes!! Thank you!!

      typo: cloud work -> could work

  13. Mar 2022
    1. # Allows you to just run "pry" inside a Rails app directory and get # everything loaded as rails c does. Inside a Bundler directory does # what bundle console does.
  14. Jan 2022
    1. It seems like it could be a good game but its really poorly executed,
    2. Unique concept that could have end up as a great game, but sadly got destroyed by lack of polish .
  15. Aug 2021
    1. I always had to set the height of them literally almost 50% taller than the content itself to accommodate for the innards growing when the form was submitted with errors (the error messaging expanded the height). If I didn’t, the submit button would get cut off making the form un-submittable.
  16. Jun 2021
    1. gitree works very similarly to tree but only lists files related to the current git repository.
    1. I've seen (and fixed) Ruby code that needed to be refactored for the client objects to use the accessor rather than the underlying mechanism, even though instance variables aren't directly visible. The underlying mechanism isn't always an instance variable - it can be delegations to or manipulations of a class you're hiding behind a facade, or a session store with a particular format, or all kinds. And it can change. 'Self-encapsulation' can help if you need to swap a technology, a library, an object specification, etc.
  17. May 2021
    1. One solution that fixed this issue with my ISP was that when I went through the first and second line and got in touch with the people that fixed my problem, I asked them if they could give me one of their personal numbers in case the same problem happened again. The problem did occur a couple more times, and I just directly called the same guy.
  18. Apr 2021
    1. That should make for interesting puzzles, except they're timed, your guys never stop moving (why not?), and the camera and controls mean it's very hard to translate intent into the game world.
    1. You don’t see a lot of them, but there are a number of “super trucks,” that people build custom. They’re essentially RVs built onto a stretched truck and used like a truck. These trucks, depending on how built, often have the same facilities RVs have, including private showers, toilets, and other plumbing essentials. They dump and refill at rest areas and rv parks that have these facilities, and live the best of both worlds - trucking without the hassle.
    1. Actually a very interesting concept allthough not perfectly executed (even considering it's based on a board game)
    2. It's a nice idea but godawful implementation.
    3. Unfortunately, it’s in the execution where “US and THEM” starts to fall apart. The game’s major problems stem from the user interface and some design choices range from questionable to downright horrible. For starters, the world map that takes up more than half of the screen can be neither scrolled nor zoomed. In a game where your interaction heavily relies on clicking various nations, this becomes a problem. While larger countries like Canada, the US and Russia are easily accessible, smaller nations require pixel perfect accuracy to interact with. Try clicking on Cuba, Ireland or Hungary and you’ll find yourself maniacally clicking shades and outlines and a handful of visible pixels in the area of these countries in vain hope that the game will acknowledge your actions.
    1. This gem uses a Rack middleware to clear the store object after every request, but that doesn't translate well to background processing with Sidekiq. A companion library, request_store-sidekiq creates a Sidekiq middleware that will ensure the store is cleared after each job is processed, for security and consistency with how this is done in Rack.
    1. “Who cares? Let’s just go with the style-guide” — to which my response is that caring about the details is in the heart of much of our doings. Yes, this is not a major issue; def self.method is not even a code smell. Actually, that whole debate is on the verge of being incidental. Yet the learning process and the gained knowledge involved in understanding each choice is alone worth the discussion. Furthermore, I believe that the class << self notation echoes a better, more stable understanding of Ruby and Object Orientation in Ruby. Lastly, remember that style-guides may change or be altered (carefully, though!).
  19. Mar 2021
    1. here is my set of best practices.I review libraries before adding them to my project. This involves skimming the code or reading it in its entirety if short, skimming the list of its dependencies, and making some quality judgements on liveliness, reliability, and maintainability in case I need to fix things myself. Note that length isn't a factor on its own, but may figure into some of these other estimates. I have on occasion pasted short modules directly into my code because I didn't think their recursive dependencies were justified.I then pin the library version and all of its dependencies with npm-shrinkwrap.Periodically, or when I need specific changes, I use npm-check to review updates. Here, I actually do look at all the changes since my pinned version, through a combination of change and commit logs. I make the call on whether the fixes and improvements outweigh the risk of updating; usually the changes are trivial and the answer is yes, so I update, shrinkwrap, skim the diff, done.I prefer not to pull in dependencies at deploy time, since I don't need the headache of github or npm being down when I need to deploy, and production machines may not have external internet access, let alone toolchains for compiling binary modules. Npm-pack followed by npm-install of the tarball is your friend here, and gets you pretty close to 100% reproducible deploys and rollbacks.This list intentionally has lots of judgement calls and few absolute rules. I don't follow all of them for all of my projects, but it is what I would consider a reasonable process for things that matter.
    1. we used `backticks` to jump into native Javascript to use moment.js

      In regular Ruby, `` executes in a shell, but obviously there is no shell of that sort in JS, so it makes sense that they could (and should) repurpose that syntax for something that makes sense in context of JS -- like running native JavaScript -- prefect!

    1. Shogi is a classic game. I know many people who want to play Shogi, but the Kanji on the pieces makes it too hard to master. I have designed this Shogi with icons so anybody can learn it easily.
    1. Our new feature, Total Cookie Protection, works by maintaining a separate “cookie jar” for each website you visit. Any time a website, or third-party content embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to that website, such that it is not allowed to be shared with any other website.
  20. Feb 2021
    1. URI::MailTo::EMAIL_REGEXP

      First time I've seen someone create a validator by simply matching against URI::MailTo::EMAIL_REGEXP from std lib. More often you see people copying and pasting some really long regex that they don't understand and is probably not loose enough. It's much better, though, to simply reuse a standard one from a library — by reference, rather than copying and pasting!!

    1. The Track() function will snap the output to the next task that is “magnetic to” the track’s semantic.
    1. The idea of the script is this: most of the important logic runs in a subshell which is piped through tee and to a logfile, so I don't have to tee every single line of the main logic to get it all logged.
    1. Record filters allow you to require an instance of a particular class (or one of its subclasses) or a value that can be used to locate an instance of the object. If the value does not match, it will call find on the class of the record. This is particularly useful when working with ActiveRecord objects.
    1. As I reported in #10, error keys get duplicated and we should namespace them. This code behaves right like AR::Base accept_nested_attributes
    1. Jan 2021. I use a small, dedicated enterprise grade SSD as a swap drive. These enterprise drives can be bought for as little as $80 for 240GB right now, and are 3D nand with load leveling and other valuable improvements for swap. By using the drive only for swap, you pretty much guarantee it won’t affect your expensive terabyte level data drive should it fail, and you still get the performance of SSD. Estimates for very heavy use are about 2 1/2 years.
  21. Jan 2021
    1. Maybe $$slots like $$props? My use case is that I'd like to wrap a slot's content in an element that applies styling that I'd like absent without the slotted content. Something like this: {#if $$slots.description} <div class="description"> <slot name="description"></slot> </div> {/if}
    1. Small components can set the size of their corner shape using a percentage of the absolute height of the component. This means the corner shape will change as the component height changes.
    1. Some may feel that the presence of the download attribute is redundant when applied to links the browser already knows to store. I disagree.
  22. Dec 2020
    1. The only solution that I can see is to ensure that each user gets their own set of stores for each server-rendered page. We can achieve this with the context API, and expose the stores like so: <script> import { stores } from '@sapper/app'; const { page, preloading, session } = stores(); </script> Calling stores() outside component initialisation would be an error.

      Good solution.

    1. Preload functions are typically used to load data that the page depends on, hence its name. This avoids the user seeing the page update as it loads, as is typically the case with client-side loading.
    1. # fix a bug in one of your dependencies vim node_modules/some-package/brokenFile.js # run patch-package to create a .patch file npx patch-package some-package

      I love how directly this allows you to make the change -- directly on the source file itself -- and then patch-package does the actual work of generating a patch from it. Brilliant.

    1. Maybe something more neutral just meaning a virtual element / no-element container would better express the intention? And regarding the syntax, maybe it would also feel less repetitive / boilerplaty than <svelte:slot slot="name" />... Maybe something like <svelte:fragment slot="name"> or <svelte:virtual slot="name">?
  23. Nov 2020
    1. That said, supporting this syntax on elements as well as components could make sense.
  24. Oct 2020
    1. Restart from scratch. Create a new program, adding in only what is needed to see the problem. Use simple, descriptive names for functions and variables – don’t copy the names you’re using in your existing code.
    2. Divide and conquer. If you’re not sure what the source of the problem is, start removing code a bit at a time until the problem disappears – then add the last part back.
    1. This would be like an executable proposal. I understand that it's beyond the original intent of having canonical patterns on the Svelte site, but it would facilitate the community to express their own patterns. Now that we have markdown preprocessors , the documentation itself can be an app.
    2. I'm suggesting that the cookbook apps be self-contained & forkable. 3rd parties could host their own cookbook recipes, possibly using a forked cookbook from an already established pattern.
    1. strict-origin: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).
  25. Sep 2020
    1. From npm@5.2.0, npm ships with npx package which lets you run commands from a local node_modules/.bin or from a central cache.
    2. By default, npx will check whether <command> exists in $PATH, or in the local project binaries, and execute that. Calling npx <command> when <command> isn't already in your $PATH will automatically install a package with that name from the NPM registry for you, and invoke it. When it's done, the installed package won’t be anywhere in your globals, so you won’t have to worry about pollution in the long-term. You can prevent this behaviour by providing --no-install option.
    1. That is, if I remove class={className} from the Child component, and/or remove the class/className prop entirely, then the class:active syntax doesn't have any effect since nothing is rendering the class prop anywhere.
  26. Aug 2020
    1. I used to be a staunch defender of proper reply styles, even for casual emails. Insert your replies below the relevant paragraph and trim the exchange to be just about the matters of discussion.
  27. Jul 2020
    1. if British Army gunners are doing a countdown before making something go bang, they actually leave out Five in case anyone mishears it as “Fire”.
  28. May 2020
    1. You should then also create a new View and apply the following filter so as to be able to tell apart which domain a particular pageview occurred onFilter Type: Custom filter > AdvancedField A --> Extract A: Hostname = (.*)Field B --> Extract B: Request URI = (.*)Output To --> Constructor: Request URI = $A1$B1
    1. It would be best to offer an official way to allow installing local, unsigned extensions, and make the option configurable only by root, while also showing appropiate warnings about the potential risks of installing unsigned extensions.
  29. Apr 2020
    1. One suggestion is to check user's passwords when they log in and you have the plain text password to hand. That way you can also take them through a reset password flow as they log in if their password has been pwned.