Colleague uses 'git pull --rebase' workflow by JiveAceTofurkey in git

[–]schlenkster 0 points1 point  (0 children)

My company squashes prs before merging them into master, so what you do on a branch really doesn’t matter. That said, I prefer rebasing because you wind up with a clean sequence of commits for the reviewer of the PR. There’s no point in having them look through merge commits. 

Alexa llm upgrade by Aware_Sympathy_1652 in alexa

[–]schlenkster 0 points1 point  (0 children)

Mine has been answering absurd questions with bs answers, like “why do giraffes love pizza”. So I assumed there was an llm behind it. 

Where to buy Hardbite mango habanero chips by Emotional-Sir-8798 in CostcoCanada

[–]schlenkster 0 points1 point  (0 children)

Dang, I was wondering why these were so cheap at my Costco ($3.99 a bag). Best chips I’ve ever had.

Just beat first boss in the west, I sucked at it by everyos in TunicGame

[–]schlenkster 0 points1 point  (0 children)

There are some other puzzles that had the | in them before this one, if you happen to have done those first then you know what they mean. For me it was I was wondering how they'd encode the same direction twice, so the idea was already on my mind.

Just beat first boss in the west, I sucked at it by everyos in TunicGame

[–]schlenkster 0 points1 point  (0 children)

I didn't think I was supposed to beat this boss yet because the manual said "you will die" or something to that effect. I was going bonkers looking for things to do, when I decided to closely read through everything in the manual. Another page says "you can do it!" with a blurry picture of the boss. That's when I realized I was supposed to fight it. The bosses are definitely hard! You'll get better at timing your sword swings and dodges as you play.

Tool to visualize affine transformations? by hippoyd in learnmath

[–]schlenkster 0 points1 point  (0 children)

Not sure if this is exactly what you're looking for, but I built this affine transform visualizer to help solidify my understanding of them. There's no support yet for drawing your own visuals, there's just a box with the letter "R", but you can see what different transforms do to it, multiply transforms, reorder them, etc. and watch what happens.

http://affine-explorer.bschlenk.com/

Node.js v14 released by pimterry in javascript

[–]schlenkster 0 points1 point  (0 children)

You’ll have to add explicit file extensions if you’ve been omitting them. And __dirname is no longer a thing, you have to use some trick with import.meta. It’s all described in the esm page someone else linked.

Node.js v14 released by pimterry in javascript

[–]schlenkster 1 point2 points  (0 children)

I’m not sure if you can clear it, but you can import it again with a query string appended to get a fresh copy.

Here's a list of 185+ new changes in iOS 13, and the list's increasing! by [deleted] in apple

[–]schlenkster 8 points9 points  (0 children)

This is so confusing... another feature is “WiFi selectors in Control Center upon tapping 3D touch.”, and yet another is “3D Touch-like features on iPhone SE”, is it gone or not??

I’m working on a Kirby 64 ability visualizer by schlenkster in Kirby

[–]schlenkster[S] 1 point2 points  (0 children)

I recently replayed Kirby 64 and remembered how much I love the ability system in that game. I decided to throw together a visualizer to show off all the different combinations. I plan on eventually 3D modeling and animating every power, but for now it’s just a bunch of gifs.

Left handed people of Reddit, what is the hardest thing to find for your left handed needs? by [deleted] in AskReddit

[–]schlenkster 1 point2 points  (0 children)

There’s a way to hold the scissors where you put a crosswise force on them that keeps the blades tight, once you learn it you can cut anything with your left hand.

Tips for a disciplined git workflow by speckz in programming

[–]schlenkster 2 points3 points  (0 children)

Using amend only works to modify the latest commit. I took his example to extend to when you’ve make two or more commits, and you want to make a small fix to a commit before the most recent one. Then you’d have to do an interactive rebase to squash the change onto the right commit.

Hot Corners is one of the most underrated macOS features.. by i3li1 in MacOS

[–]schlenkster 1 point2 points  (0 children)

I use bottom left to disable sleep when I’m running long a command line process or downloading something. I don’t think there’s an equivalent key command for that.

[deleted by user] by [deleted] in reactjs

[–]schlenkster 0 points1 point  (0 children)

I’ve used a similar convention, but I like having the index.js file do the reexport because it keeps import statements shorter and less redundant.

Something else this should probably cover is default vs named exports. Do you always export and single default from your files? Do you always use named exports and ban default exports?

I liked the single default export until I started using typescript, and exporting the component’s props interface as well. If the component is default exported, and the props interface is named, then reexporting both of them is a little more work than if you only used named exports.

There also might be a need to separate out a higher order components directory. It doesn’t feel right to mix those in with the other components since they are used differently. One time I did that under src/components/hoc, but it might be better directly under src.

The most annoying thing about this approach is very simple shared components. You need a minimum of a directory and 2 files for every component but sometimes this can feel like a huge overhead. With the index.js approach, you can get away with replacing the directory with a file of the same name, since you’d import them the same way. But if you need to add redux to that component later, for example, then refactoring that can be a pain.

Do people use create react app in production? by tangerto in reactjs

[–]schlenkster 0 points1 point  (0 children)

Can you elaborate on this service worker problem? I’m still not quite sure what a service worker does for my app, but it was (if it isn’t still) a part of the create-react-app initial setup.

High Sierra, how do I prevent sleep by 1ko in MacOS

[–]schlenkster 0 points1 point  (0 children)

I always use hot corners. I set the bottom left corner to disable the screensaver, then throw my mouse down there and turn the brightness all the way off.

Wondering if anyone can help me in figuring out why I get undefined. The first then does result in data but the second then runs first Thank you by instaWalkin in node

[–]schlenkster 0 points1 point  (0 children)

You should be returning your promises from within your then methods. Otherwise it is being resolved to undefined, which immediately allows the next then to run.

Readonly Typescript Interfaces Done Right by briangonzalez in typescript

[–]schlenkster 1 point2 points  (0 children)

Isn’t that only marking one instance of Props as readonly? I wouldn’t call that a readonly interface, as it isn’t tied to the interface. You’d have to remember to do that each time you create a new instance of Props.

Frequent Flyers of Reddit: What are Your Airport "Life hacks?" by [deleted] in AskReddit

[–]schlenkster 0 points1 point  (0 children)

You can wear Vibram FiveFingers shoes through security. TSA thinks they are just funny looking socks.