docs.angularjs.org

In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing the value or expression with ::, e.g. {{ ::myValue }}, {{ ::myValue >= 42 }} and...

...myExpression(value) | someFilter }}. One-time bound expressions get dropped from the list of watchers as soon as they can be resolved. Performance-wise the impact for this small change is...

stackoverflow.com

...it can wipe the database. Importing a remote dump with geordi Asking Postgres to show the storage path of a database Doing these things without a superuser will show a...

...raise PG::InsufficientPrivilege. To do so, the application's PostgreSQL user must be a superuser. Grant superuser rights like this: $ sudo -u postgres psql # ALTER USER WITH SUPERUSER...

aws.amazon.com

...Transcoder is video transcoding in the cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or...

...transcode”) video files from their source format into versions that will playback on devices like smartphones, tablets and PCs. This might be a good alternative for services like Panda which...

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node. Below you can find such a list. It's all...

...credit goes to the Capybara committers. When you talk to Capybara from a Cucumber step definition, you always have page as the document root node, or whatever you scoped to...

...application you often need to move data between the client (HTML, Javascript) and the server (Ruby, Rails). Step 1: Moving HTML snippets Add a find-as-you-type search to...

...should be able to use it like this: var query = // ... search(query).then(function(html) { $('.search-results').html(html) }) Please make sure that you don't duplicate view code. Both...

It's like a GUI for the famous git add [-p]. Select files with the up/down-keys and hit u for staging/unstaging the whole file Enter for showing the diff of...

j and k to navigate in the diff u again to stage/unstage chunks 1 to stage/unstage only lines \ to split large chunks F5 to refresh the view

If you paste multiple lines of text into a cell, Calc's AutoCorrect will change the first character of the...

...you want to inspect a method's magic), you need to enable it explicitly: script/console --debugger If you cannot access local variables etc, see this card. WEBrick For WEBrick, enable...

script/server --debugger

makandra dev
github.com

...to it if the content inside is too long. While you can only truncate single lines with CSS by using text-overflow, this small JavaScript library also allows truncating text...

...For Internet Explorer, the element you clamp on needs to have its line-height set in pixels. A relative value will not work. There is also the -webkit-line-clamp...

Running Cucumber tests while your cucumber.yml is 100% valid may still produce the following error. cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on...

sitepoint.com

Scope is all about where something is visible. It’s all about what (variables, constants, methods) is available to you at a given moment. If you understand scope well enough...

...more importantly, which ones are not. The article gives detailed explanation on the variable scope in ruby with examples that are easy to understand. Every ruby developer should at least...

If you're getting this strange error message when setting debugging breakpoints, probably HAML is the culprit. Cause As far as I could find out, the error is the result...

...of setting a breakpoint (debugger) in a helper method that's called from a haml partial. Suggestions Try putting the breakpoint into the HAML view...

miekd.com

...or quote from an article is duplicated within the article using a different formatting style so that it jumps out at the reader. Blatantly copying the excerpt of the pull...

A pull quote is a purely visual technique, and therefore should not change the structure of the body. Next to that, a structural representation of the excerpt would be seen...

caniuse.com

There is a kinda secret, yet well supported CSS feature called currentColor. It's like a special CSS variable that has been supported in almost all browsers for almost all...

...time (see linked Caniuse). Usage The currentColor value can be used in CSS to indicate the current value of color should be used. A common use case is setting a...

...need to test some HTML, e.g. an embed code, you can use RubyMine's "scratch files": File > New Scratch File (or Ctrl + Shift + Alt + Ins) Select "HTML" as file type...

...or paste the HTML Move your mouse to the upper right corner of the scratch file editor. Pick a browser to instantly open your file...

blog.mailgun.com

Styling HTML email is painful. Tables, inline CSS, unsupported CSS, desktop clients, web clients, mobile clients, various devices, various providers. All these things have to be thought about and tested...

...It’s no surprise developers don’t want to deal with this when there is a backlog of more important priorities. We’ve tried to remove some of the pain...

makandra dev
github.com

Katapult was an endeavor to dramatically speed up starting a new Rails application. However, it turned out to save less time than expected, while requiring more time for maintenance than...

...anticipated. Since its benefits fell too low, we have decided to not continue developing Katapult. You can still use Katapult for generating ready-to-run applications with model CRUD, authentication...

perlstalker.vuser.org

While you can set your own font in your terminal or other tools, it will not change the default "Monospace" font that some applications use. To change that, edit ~/.fonts.conf...

...and add settings for the "monospace" family. Here is how it looks on my machine now: monospace DejaVu Sans Mono Fill in "DejaVu Sans Mono" with your preferred font's...

rubyforge.org

...the parsing to ruby_parser. Unfortunately, ruby_parser appears to be confused when a string contains both escaped chars (that is, any unicode characters as ndash, umlauts etc.) and #{} blocks...

...which makes it extremely slow. The easiest "solution" we came up with was to replace all occurrences of UTF-8 chars with their HTML entities (so "ü" instead of "ü...

After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after...

...Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:197. NOTE: Gem::SourceIndex#add_specs is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex...

bugs.launchpad.net

Terminator has a cool feature that allows you to split your terminal into many panels and type in all of them at the same time. It's called broadcasting and...

...and could be very dangerous (e.g. if you're logged in to a production server in a terminal that is on another workspace). To prevent the broadcast from affecting other...

developer.squareup.com

We're pleased to announce Ruby 3’s new language for type signatures, RBS. One of the long-stated goals for Ruby 3 has been to add type checking tooling...

...discussion with Matz and the Ruby committer team, we decided to take the incremental step of adding a foundational type signature language called “RBS,” which will ship with Ruby...

This only works when you actually have a session ID (not the case for Rails' CookieStore, for example): request.session_options[:id] # => "142b17ab075e71f2a2e2543c6ae34b94" Note that it's a bad idea to...

...expose your session ID, so be careful what you use this for...

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass a :lower argument to it. >> 'foo_bar_baz'.camelize