javascript map async await
Problem: want to obtain the text from an array of elements
Solution:
- Promise.all and async await map:
selenium webdriver chrome headless
Problem: wanted to use chrome headless in selenium tests.
Solution: found here. Since I’m using chrome 61, I don’t need to set the binary to chrome.
create-react-app environment variables
Problem: wanted to pass environment variables to an app created with create-react-app ( in development )
This is how I did it ( not exactly sure which version of react-scripts I’m using, since I ejected the config ):
- create a .env.development file, in your app’s root folder and add your variables there:
- open config/envs.js and add your variable to the object in getClientEnvironment function:
golang build time object for specific datetime
Problem: want to have a datetime for a specific day, at a specific hour
Solution: one possible solution here:
node reverse proxy
Problem: want to setup a reverse proxy for some urls
Solution: use http-proxy-middleware:
remove yellow color from fields chrome autocomplete
Problem: want to get rid of the yellow color that appears when chrome autofills a field.
Solution: found here
convert dot file to png
Problem: have a dot file I’d like to view as a png.
Solution: found here
- install graphviz
brew install graphviz
- generate png:
dot -Tpng DocName.dot -o DocName.png
kotlin data class spring default constructor
Problem: data class generated by kotlin does not have a no arg constructor.
Solution: Solution found here. Add kotlin-noarg to build.gradle ( change if using other versions, more lines than needed are shown for context ) :