(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
any
: magic, ill-behaved type that acts like a combination of never
(the proper [bottom type]) and unknown
(the proper [top type])
never
is assignable to any
, and any
is assignable to anything at all.any & AnyTypeExpression = any
, any | AnyTypeExpression = any
unknown
: proper, well-behaved [top type]
unknown
. unknown
is only assignable to itself (unknown
) and any
.unknown & AnyTypeExpression = AnyTypeExpression
, unknown | AnyTypeExpression = unknown
any
whenever possible. Anywhere in well-typed code you're tempted to use any
, you probably want unknown
.When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
GitHub associates a unique resource ID (or "database ID" or just "ID") with each
API-accessible resource. For example, each [issue][issue-id],
[repository][repository-id], and [user][user-id] has a global ID. In my limited
experience with it, GitHub's REST API generally does not expose endpoints by
which resources can be queried by ID (though it does have some [undocumented
endpoints][repo-rest]). These resource IDs have been superseded by distinct
[global node IDs][global-ids] (node_id
). GitHub's GraphQL API allows retrieval
of a node by its ID, called a "direct node lookup".
As you can tell, you likely don't have much reason to interact with the older
FROM node:14-slim | |
ENV NODE_ENV=production | |
COPY pnpm-deploy-output /app | |
WORKDIR /app | |
ENTRYPOINT ["/app/entrypoint.sh"] |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.
I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.
But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.
If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.
Last year, we migrated a large project form JS to TS.
We did this with ts-migrate, and we renamed all instances of any
to $TSFixMe
, to differentiate them from real uses of any
.
In order to see our progress on removing $TSFixMe
, we build the a github workflow that adds comments to PRs with our progress, eg: