# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
{ | |
"extends": [ | |
"@frontend/coinbase", | |
"prettier", | |
"prettier/react", | |
"prettier/flowtype" | |
], | |
"rules": { | |
"flowtype/type-id-match": [ | |
2, |
Community Packages (43) /home/capaj/.atom/packages | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Here we use Homebrew to install rbenv:
brew update; and brew install rbenv ruby-build
- Add
~/.rbenv/shims
to your PATH - Include the contents of completions/rbenv.fish in your Fish config.
- Run
rbenv install 2.2.2
andrbenv rehash
- Run
rbenv global 2.2.2
Now you can run gem install bundler
and bundle install
within your Ruby project.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.