| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
| # coding=UTF-8 | |
| from __future__ import division | |
| import nltk | |
| from collections import Counter | |
| # This is a simple tool for adding automatic hashtags into an article title | |
| # Created by Shlomi Babluki | |
| # Sep, 2013 |
| #---------------------------------------------------------------# | |
| # This script manually goes through youtube and collects all # | |
| # of your viewing history into a convenient text file. This # | |
| # might take about 30min to an hour, depending on your # | |
| # computer's RAM, processing speed, and internet connection. # | |
| # Note that this program requires the splinter module to work. # | |
| # Run 'pip install splinter' to get it. # | |
| #---------------------------------------------------------------# | |
| print "Making sure you're not using python 3..." | |
| from splinter import Browser |
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
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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