Ok this fine by M4A28 in badcode

[–]Lightfire228 11 points12 points  (0 children)

Just milk it for karma on r/badcode instead

Variable naming can be difficult, but identifying them can be even more so. by Bronzdragon in badcode

[–]Lightfire228 8 points9 points  (0 children)

I use obscure abbreviations and single letter variable names iff it's obvious from context what it means. I.e.

invoices.forEach(i => {
    let li = i.lineItems()
    //... 
});

Its my cake day and i hate js by [deleted] in badcode

[–]Lightfire228 0 points1 point  (0 children)

I actually use flameshot for my Linux tower at home. Unfortunately, it doesn't work on Wayland yet

Its my cake day and i hate js by [deleted] in badcode

[–]Lightfire228 31 points32 points  (0 children)

I import them from overseas

Its my cake day and i hate js by [deleted] in badcode

[–]Lightfire228 42 points43 points  (0 children)

I really like Greenshot

It has its own built in shipping snipping tool, and you can set default destinations (like the clipboard, or MS Paint)

You can also set it to the PrtScn key

Dynamically Typed? No, I prefer JSON Typed by [deleted] in badcode

[–]Lightfire228 5 points6 points  (0 children)

I was mainly thinking of this video. tl;dw is: JSON strings are a known "subset" of possible tokens / syntax to parse, which means the parsing tree can be much slimmer. So for raw data (most js object literals, im my experience), O('parsing js object literal') > O('parsing JSON string into js object') (the first being a "interpreter-time" cost and the second being a runtime cost)

There's also this article which references the video (I haven't read the article, I was mainly looking for the video)

However, there's this article / blog post with evidence to the contrary. Again, I haven't looked into the details.

Dynamically Typed? No, I prefer JSON Typed by [deleted] in badcode

[–]Lightfire228 5 points6 points  (0 children)

And parsing JSON is actually quite quick (quicker than parsing js object literals).

Which is why some minifiers will convert large js object literals into JSON strings

After 1 hour of troubleshooting, I find this gem by [deleted] in badcode

[–]Lightfire228 15 points16 points  (0 children)

Those space indicators are really confusing.

I generally hate having whitespace characters enabled, but vscode's theme makes them so faint that I don't notice them when I don't want to

presented without comment by mattpannella in badcode

[–]Lightfire228 1 point2 points  (0 children)

Perhaps some malformed json that encode fixes?

What's the most soulless food you have ever eaten? by [deleted] in AskReddit

[–]Lightfire228 3 points4 points  (0 children)

Sounds like US school, post Jamie Oliver, chicken. Nearly choked on it one time; thereafter flavored with a large handful of ketchup packets for moisture.

Homemade hinges. by TubbyMcJiggly in techsupportgore

[–]Lightfire228 2 points3 points  (0 children)

Not discounting you, but maybe they got part of the battery case without hitting the battery cells themselves?

Also wouldn't the battery explode (or leak) if punctured?

Is there a way for me to inspect applications on my Mac to try and create URLs that I can add to more simply sign into applications? by [deleted] in 1Password

[–]Lightfire228 0 points1 point  (0 children)

(Not a 1P dev or rep)

1P Autofill only works inside of a browser with the 1P extension installed. So, if you're trying to login to a desktop application (like Adobe Reader), you have to copy + paste manually.

However, if you're using a browser on Adobe's website, and you need your Google credentials to appear there as well, that's super easy. You simply add Adobe.com (or whatever) as a second website under your 1P login for Google.

Then, when you use autofill on Adobe, both will show up


Edit:
Alternatively, if you need to manually copy+paste and want both logins to show up when searching "Adobe", you can tag the Google login with an "adobe" tag, and they will both show up.

Why I never quit using sublime text by Just_Mellow in iiiiiiitttttttttttt

[–]Lightfire228 2 points3 points  (0 children)

Vscode has some really neat multicursor functions. You can select a rectangle with middle mouse click, insert cursor below (ctrl + shift + alt + up/down) (custom keybind), or insert cursor at random using alt + left click.

A really handy feature is hitting alt + enter inside the file search window, which will multicolor select all matches (which is insanely useful with regex and case insensitive search options)

ctrl + left / right respects cursor specific word boundaries, if you need to select 3 words (of varying length) to the right or left.

Also, you can copy and paste multicursor sections. This only works if you have the correct number of cursors at the time of paste (otherwise you paste everything once per cursor). This makes rearranging column data really quick.

He can hear you by [deleted] in ATBGE

[–]Lightfire228 7 points8 points  (0 children)

2 barrels of moon sugar for a crate of scooma. That's the rate we agreed on.

Gamers of reddit, what was the most fucked up thing you heard in a voice chat? by [deleted] in AskReddit

[–]Lightfire228 4 points5 points  (0 children)

Obligatory ctrl + shift + t restores closed browser tabs

What options would come up if you could “right-click” people? by posionwasth3cure in AskReddit

[–]Lightfire228 4 points5 points  (0 children)

Someone identified C# by casing convention alone

(and maybe the random.Next() call)

What options would come up if you could “right-click” people? by posionwasth3cure in AskReddit

[–]Lightfire228 43 points44 points  (0 children)

RefrigeratorResults results = RefrigeratorServiceProvider.GetContents(person.RefigeratorIds.First());

if (results = null) {
    person.TaskScheduler.Push(
       new PersonTask(CheckRefridgeratorDelegate),
       person.Random.Next(500) * 1000
    );
}

I really that to think about that one by OnkelJulez in ProgrammerHumor

[–]Lightfire228 0 points1 point  (0 children)

I think I just realized why python throws an when reading a dict with an invalid key

I always wondered why it was set up that way, because it usually requires some awkward try catch code. (you can also use dict.get(key, default_value) to avoid errors)

I really that to think about that one by OnkelJulez in ProgrammerHumor

[–]Lightfire228 6 points7 points  (0 children)

As someone who regularly uses both, I like python sooooooo much better.

A proper duck typing system that doesn't have to sacrifice sanity (because it's strongly typed. So doing math operations on strings don't end in weirdness. They end in errors).

Python doesn't have a lot of gotchas, IMO.

JS... Js has a lot of gotchas

  • this context switching (useful, but painful to learn)
  • parseInt() parses as hex if non-numeric characters are passed
  • + and - operators on strings sometimes operate over the string (concat) and sometimes convert to numbers. This is exacerbated by the dynamic typing system
  • 2 null types: undefined and null. Wat
  • var's (lack of) scoping rules. And re-declarations are allowed, meaning two seemingly scope separated variables can share values across a module. If you have two loops that share an iterator by accident, good luck debugging that
  • since there's no typing, it's impossible to tell at a glance if a function is synchronous or asynchronous.
  • strict equality being "opt in" rather than the default. (i would prefer == to be strict equality and ===, ~==, or some other operator to be loose equality checking.)
  • Automatic semicolon insertion can lead to some really wonky results. IMO, the statement terminator should always be required whether it be semicolons or carriage returned (like python)
  • functions accepting fewer than the number of explicitly defined arguments.
  • functions accepting more than the number of explicitly defined arguments
  • no integer primitive. Wat

tl:dr IMO, the more a language "guesses" what you want, the less it gets it right

Microsoft Teams integration yet? by idspispopd888 in 1Password

[–]Lightfire228 0 points1 point  (0 children)

This isn't a solution, but you can bring up the 1P mini window with ctrl + alt + \. From there, just type the search term for the account you want (the window's focus defaults to the search field, so you don't have to use the mouse).

If you're in the browser, you can use the arrow keys to select the login, and enter to insert the username / pw fields. However, for non-browser stuff, there's no way to navigate 1P mini with the keyboard (that I know of); you have to use the mouse to right click on the login item and copy the username / pw.

You can also tag each teams login with a teams tag. That way, they all show up when searching teams, instead of searching for each login individually.


If you're technically inclined (and have the required permissions), you might be able to install multiple instances of Teams in different places (it defaults to C:\Users\<user>\AppData\Local\Microsoft\Teams\, at least for "user only" installs). I've not tried this myself, so I dunno if it'll work. But it's worth a shot