I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
(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.
- Use one-time-bind on expressions ( {{::value}} )
- Replace
$scope.$apply()with$scope.$digest()whenever possible - Move filters to controllers
To get the total watchers on the current page, you can run this script on the browser console:
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
Automatically deletes old emails that match the specified label.
- Create a new Google Apps Script at https://script.google.com
- Overwrite the placeholder with the javascript below
- Update the following constants:
LABEL_TO_DELETE: the label that should be have old messages deleted
| #!/usr/bin/sudo ruby | |
| # | |
| # revealer.rb -- Deobfuscate GHE .rb files. | |
| # | |
| # This is simple: | |
| # Every obfuscated file in the GHE VM contains the following code: | |
| # | |
| # > require "ruby_concealer.so" | |
| # > __ruby_concealer__ "..." |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
| <p th:text="${bean.field + '!' + bean.field}">Static content</p> | |
| th:text="'static part' + ${bean.field}" | |
| th:text="${'static part' + bean.field}" |
You often have several docker containers and applications which work together in the locel development environment. You need the following communications:
- docker container to localhost
- localhost to docker container
- docker container to docker container
You have a way to connect localhost-to-docker using -p (port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432 and then connect like to normal PostgreSQL