17 private links
The protocol is available as req.protocol. docs here
var fullUrl = req.protocol + '://' + req.get('host') + req.originalUrl;
By using above example, you can get full page URL.
Dev-test pipeline automation, 100,000+ free apps, public and private registries
The truth is, ternaries are usually much simpler than if statements. People believe the reverse for two reasons:
- They’re more familiar with if statements. Familiarity bias can lead us to believe things that aren’t true, even when we’re presented with evidence to the contrary.
- People try to use ternary statements as if they’re if statements. That doesn’t work, because ternary expressions are expressions, not statements.
Before we get into the details, let’s define a ternary expression:
A ternary expression is a conditional expression that evaluates to a value. It consists of a conditional, a truthy clause (the value to produce if the conditional evaluates to a truthy value), and a falsy clause (the value to produce if the conditional evaluates to a falsy value).
Finding D3 plugins with ease.
<Route path="/:path(path1|path2)" component={MyComp} />
Just-add-water CSS animations
react-motion - A spring that solves your animation problems.
The Transition component lets you describe a transition from one component state to another over time with a simple declarative API. Most commonly it's used to animate the mounting and unmounting of a component, but can also be used to describe in-place transition states as well.
React implements a browser-independent DOM system for performance and cross-browser compatibility. We took the opportunity to clean up a few rough edges in browser DOM implementations.
npm install -g
won't finish installs on WSL Ubuntu. What I did to fix this issue:
- turned of any application running on port 3000
- cleaned npm cache
- some said I should remove package.json.lock, but what about Yarn?
Customizing tmux is as easy as editing a text file. tmux uses a file called tmux.conf to store its configuration. If you store that file as `~/.tmux.conf
(Note: there’s a period as the first character in the file name. It’s a hidden file) tmux will pick this configuration file for your current user. If you want to share a configuration for multiple users (e.g. if you should feel the urge to start tmux as super user (please think about this carefully!)) you can also put your tmux.conf into a system-wide directory. The location of this directory will be different accross different operating systems. The man page (man tmux) will tell you the exact location, just have a look at documentation for the -f
parameter.
Extension for Visual Studio Code - Sublime Text's babel-sublime grammar in VS Code.
To kill a panel, use Ctrl + key
x
Shoelace.css is a lightweight, forward-thinking CSS library built with future CSS syntax. It’s easy to use and highly customizable. Bootstrap users will find it familiar, yet refreshing.
You can use Shoelace with just about any browser. The CDN version is great for prototyping, but to take advantage of all its features you should build Shoelace from source.
mintty-colors
is a python package that is easiest to install using pip.
pip install mintty-colors
This installs a command-line tool - mtc that let's you control the colors of your mintty session.
I find as I am building my redux app, one piece of functionality at a time, I keep needing to add {actionTypes, actions, reducer} tuples for each use case. I have been keeping these in separate files and even separate folders, however 95% of the time, it's only one reducer/actions pair that ever needs their associated actions.
To me, it makes more sense for these pieces to be bundled together in an isolated module that is self contained, and can even be packaged easily into a library.