Lately I've seen a lot of projects use .env files to store application configuration, files which look something like this:
FOO=bar
Bar=baz
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
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
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
Ember.Controller
instead of Ember.ArrayController
or Ember.ObjectController
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.// The hacky bit of this approach is that this module uses | |
// jQuery, but it is not referenced here. This is because I | |
// am populating it in the test via global namespace. | |
// | |
// In the browser this still works because I am adding jQuery | |
// via a Browserify transform (browserify-global-shim). | |
function someModule() { | |
} | |
modules.export = someModule; |
Undo/Redo is one of those features of an application that you almost always need to have if you are building serious GUI tools for people to do work.
The best way to look at undo/redo is two stacks of operations the user has performed:
In this section, we will show you the advanced methods for controlling infowindows styles using the CartoDB interface. These skills will allow you to have highly customized infowindows for your published maps, created directly on your account. You don't need any programming skills to edit infowindows and you can see a tutorial of basic methods here. This section is about advanced methods and you will be required to use basic skills in HTML and later CSS.
CartoDB gives you direct access to the HTML that controls the layout of your infowindows. If you don't feel ready to edit HTML and CSS see the tutorial of basic methods. In CartoDB you can find the advanced editor by selecting the Infowindow Wizard and then clicking the small code tag in the upper right.
#!/usr/bin/env ruby | |
require 'tempfile' | |
file = Tempfile.new(['js2coffee', '.js']) | |
file.write ARGF.read # write vim selection to tmp file | |
file.rewind | |
file.close | |
puts `js2coffee #{file.path}` # requires js2coffee | |
file.unlink # deletes the temp file |