Readit News logoReadit News
nadinengland commented on Rust's Block Pattern   notgull.net/block-pattern... · Posted by u/zdw
dwattttt · 10 days ago
By the by, code blocks on here are denoted by two leading spaces on each line

  like
  this

nadinengland · 7 days ago
ah, much appreciated!
nadinengland commented on Rust's Block Pattern   notgull.net/block-pattern... · Posted by u/zdw
nadinengland · 11 days ago
I love that this is part of the syntax.

I typically use closures to do this in other languages, but the syntax is always so cumbersome. You get the "dog balls" that Douglas Crockford always called them:

``` const config = (() => { const raw_data = ...

  ...

  return compiled;
})()'

const result = config.whatever;

// carry on

return result; ```

Really wish block were expressions in more languages.

nadinengland commented on Show HN: Kuboble.com – Minimalistic sliding pieces puzzle game   kuboble.com... · Posted by u/kuboble
ismailmaj · 3 years ago
stuck for 20 minutes on lvl 6 for the optimal solution, 10/10 would recommend
nadinengland · 3 years ago
I keep coming back to it and can't get better than 8 on lvl 6. Would love to know how you've done it!
nadinengland commented on New divorce app to help couples split assets in New York without lawyers   resolvy.com/... · Posted by u/nickMMM
leobg · 3 years ago
Harry Browne had a technique for splitting up assets: One partner does the splitting. And the other partner gets to choose who gets which pile.

(He also has a more elaborate one, where the partners do a virtual auction of all items among themselves, to account for cases where particular items are worth a lot more to one of them. I believe it’s in his book “How I Found Freedom in an Unfree World”).

nadinengland · 3 years ago
When I cook I usually have a portion I prefer. I always try my living hardest to let my wife pick which portion I have as to make it fair.
nadinengland commented on Adminer: Database management in a single PHP file   github.com/vrana/adminer... · Posted by u/lsferreira42
drej · 4 years ago
It's wonderful tool and has simplified workflows for many, just be mindful of its one giant security implication. Should your database credentials ever leak in any way (lost/stolen property, incorrect git commit, screencasting mishap, ...), having an Adminer/phpMyAdmin instance running on an otherwise unrestricted address, you're opening up (quite literally) your server to a world of trouble.

(I speak from experience. I've seen a lot of credentials leak together with source code. This meant I saw "secret" paths where Adminer was hosted on a given site. Having database credentials meant I didn't have to somehow circumvent network security to get to the database itself. [Yes, I disclosed all of this to the server operator and even got a measly $50 gift card out of it :-)])

nadinengland · 4 years ago
Yeah, at previous jobs there has been a db.devopsdomain.com (etc) which acted like a bastion into the network from which you could connect with DB credentials to the actual databases.

It's convenient I will say that. I've tried not to replicate this exactly and instead have adminer running on a server on the network but only listening to localhost connections. To get access to it you can then SSH tunnel the ports locally:

> # Route 8082 on your machine to localhost:8080 on the server: > ssh -N -L 8082:localhost:8080 db.devopsdomain.com

nadinengland commented on Things I can’t do on macOS which I can do on Ubuntu (2020)   shkspr.mobi/blog/2020/04/... · Posted by u/robin_reala
GlassKingdom · 4 years ago
I’m embarrassed to say that I’ve been using Mac for years and still don’t know how to make an application fullscreen like Windows does. The green button hides the menu bar, and alt clicking the green buttom makes the app bigger but doesn’t fill the whole screen.

Either I am stupid or Mac is bad at discoverability.

nadinengland · 4 years ago
To make it maximise the area in your current mac Space (i.e. not go "full screen" in a new Space) you can go: Mac Menu -> Window -> Zoom. I just usually double click the App's window bar and it stretches the same way.
nadinengland commented on Spanish Wordle   wordle.santiagodebus.com/... · Posted by u/sandes
nadinengland · 4 years ago
Ecco Par[IT]le in italiano: https://pietroppeter.github.io/wordle-it/
nadinengland commented on Go by Example   gobyexample.com/... · Posted by u/A_Ghz
nadinengland · 12 years ago
Another nice introduction is the Go Playground's Tour (http://tour.golang.org/#1).
nadinengland commented on Regex Golf   regex.alf.nu/... · Posted by u/subbz
acln · 12 years ago
Balance (194)

  ^<.*>$|^<<.*>>$|^<<<.*>>>$

nadinengland · 12 years ago
Balance (286)

  ^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
If we had named captures:

  ^(((?<P><)|(?<-P>>))*(?(P)(?!)))$

u/nadinengland

KarmaCake day31April 19, 2012View Original