- Mar 2024
-
stackoverflow.com stackoverflow.com
-
I suppose it would be easy to make a pushshopt function like there is a pushd, and use bash arrays to remember previous option before setting them. Like pushshopt +extglob -nocasematch and popshopt
-
- Jan 2024
-
gitlab.com gitlab.com
-
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
-
-
www.pcmag.com www.pcmag.com
-
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.
-
- Dec 2023
-
www.dezeen.com www.dezeen.com
-
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
-
-
www.linkedin.com www.linkedin.com
-
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
- Rupert Read article on alternative COP
-
-
- Nov 2023
-
developers.google.com developers.google.com
-
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.
-
-
github.com github.com
-
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....
Tags
Annotators
URL
-
- Jul 2023
-
-
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.
-
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
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.
-
- May 2023
-
stackoverflow.com stackoverflow.com
-
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.
-
- Mar 2023
-
-
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.
-
- Feb 2023
-
github.com github.com
-
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
Tags
Annotators
URL
-
- Jan 2023
-
guides.rubyonrails.org guides.rubyonrails.org
-
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
Tags
Annotators
URL
-
- Dec 2022
-
www.rfc-editor.org www.rfc-editor.org
-
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.
-
- Sep 2022
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
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.
Tags
Annotators
URL
-
- Jul 2022
-
github.com github.com
-
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
-
- Mar 2022
-
gist.github.com gist.github.com
-
# 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.
Tags
Annotators
URL
-
-
github.com github.com
-
t.datetime :seen_at, default: { expr: 'NOW()' }
-
- Jan 2022
-
store.steampowered.com store.steampowered.com
-
It seems like it could be a good game but its really poorly executed,
-
Unique concept that could have end up as a great game, but sadly got destroyed by lack of polish .
-
- Aug 2021
-
css-tricks.com css-tricks.com
-
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.
-
- Jun 2021
-
blog.viktoradam.net blog.viktoradam.net
-
This compatibility simply means that you can have a .githooks folder at the root of your project, where you can organize your individual hooks into folders.
-
-
github.com github.com
-
gitree works very similarly to tree but only lists files related to the current git repository.
Tags
Annotators
URL
-
-
-
HTTP REST seems like an "out of external dependency" way to go.
-
-
stackoverflow.com stackoverflow.com
-
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.
-
- May 2021
-
interpersonal.stackexchange.com interpersonal.stackexchange.com
-
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.
-
- Apr 2021
-
store.steampowered.com store.steampowered.com
-
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.
-
-
www.quora.com www.quora.com
-
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.
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
The core idea of the game is fine, but the implementation is poor.
-
-
store.steampowered.com store.steampowered.com
-
Actually a very interesting concept allthough not perfectly executed (even considering it's based on a board game)
-
It's a nice idea but godawful implementation.
-
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.
-
-
store.steampowered.com store.steampowered.com
-
github.com github.com
-
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.
-
-
medium.com medium.com
-
-
“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!).
-
-
code.visualstudio.com code.visualstudio.com
-
We continued improving our support extending the Markdown renderer in Notebooks.
-
- Mar 2021
-
news.ycombinator.com news.ycombinator.com
-
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.
-
-
www.sitepoint.com www.sitepoint.com
-
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.
Tags
- neutral ground
- JavaScript: as a process VM
- competition in open-source software
- neutral/unbiased/agnostic
- programming languages: choosing the best language for the job
- good idea
- level playing field
- avoid giving partiality/advantage/bias to any specific option
- separation of concerns
Annotators
URL
-
-
hyperstack.org hyperstack.org
-
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!
-
-
www.kickstarter.com www.kickstarter.com
-
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.
-
-
trailblazer.to trailblazer.to
-
Since you can reference outputs by their semantic, you as a modeller only connect conceptual termini to ongoing connections!
-
-
blog.mozilla.org blog.mozilla.org
-
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.
-
- Feb 2021
-
github.com github.com
-
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!!
-
-
trailblazer.to trailblazer.to
-
The Track() function will snap the output to the next task that is “magnetic to” the track’s semantic.
-
-
stackoverflow.com stackoverflow.com
-
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.
-
-
github.com github.com
-
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.
-
-
github.com github.com
-
def initialize(attributes=nil) self.assign_attributes(attributes) end
-
-
-
As I reported in #10, error keys get duplicated and we should namespace them. This code behaves right like AR::Base accept_nested_attributes
Tags
Annotators
URL
-
-
-
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.
-
- Jan 2021
-
-
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}
-
-
www.wnycstudios.org www.wnycstudios.org
-
we had to change society
yep
-
-
material.io material.io
-
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.
-
-
css-tricks.com css-tricks.com
-
Some may feel that the presence of the download attribute is redundant when applied to links the browser already knows to store. I disagree.
-
- Dec 2020
-
github.com github.com
-
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.
-
-
sapper.svelte.dev sapper.svelte.dev
-
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.
-
-
www.npmjs.com www.npmjs.com
-
# 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.
Tags
Annotators
URL
-
-
github.com github.com
-
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">?
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
I would suggest that if you want the behaviour you get when you specify initial-scale=1, then specify initial-scale=1.
-
-
github.com github.com
-
That said, supporting this syntax on elements as well as components could make sense.
Tags
Annotators
URL
-
- Oct 2020
-
github.com github.com
-
Start by reading this post (Final Form + Fonk)
-
-
github.com github.com
-
I too have been confused by behavior like this. Perhaps a clearly defined way to isolate atomic units with synchronous reactivity would help those of us still working through the idiosyncrasies of reactivity.
-
-
medium.com medium.com
-
But for big projects it should work out to just apply this techniques to certain sub-folders in your project where this problems occurs, as-if they are stand alone libraries.
-
-
stackoverflow.com stackoverflow.com
-
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.
-
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.
-
-
-
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.
-
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.
-
-
developer.mozilla.org developer.mozilla.org
-
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).
-
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
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.
-
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.
-
-
github.com github.com
-
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.
Tags
Annotators
URL
-
- Aug 2020
-
signalvnoise.com signalvnoise.com
-
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.
-
- Jul 2020
-
boards.straightdope.com boards.straightdope.com
-
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”.
-
- May 2020
-
support.google.com support.google.com
-
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
-
-
-
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.
-
- Apr 2020
-
github.com github.com
-
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.
-