...use (Unpoly's up.on, jQuery's .on, ...) and wrap the element selection into a compiler function...
Sometimes you will need an input field which wraps content and grows in height as soon as content gets longer...
...attributes like this: %a{href: '/path', data: { method: 'delete', confirm: 'Really delete?' }} Label This compiles to: Label Example: Unpoly attributes You might also want to use this to define multiple...
...prefixed by up-: %a{href: '/path', up: { target: '.element', transition: 'zoom-in' }} Label This compiles to:
I use the TypeScript compiler for this, since its output is more minimal than Babel's. The following will transpile all src/*.js files into a file build.js:
...to set a passphrase for the keystore and an alias to access your certificate. Compile it into a class file: javac ImportKey.java Run it to import your key and certificate...
Moved from Less to Sass. Bootstrap now compiles faster than ever thanks to Libsass, and we join an increasingly large community of Sass developers. Improved grid system...
...Sendfile, which is sort of bad practice. You can either live with it or compile a newer version of the module. If you got a module version >= 0.10 you can...
...multiple renderings of the same view. Example - @users.each do |user| .row[user] = user.name This compiles to: Alice Bob Since the record's #id is part of the generated selector, it...
...her session. After that only fragments are updated and the tag that sends the page view to Google Analytics is probably never evaluated again. Luckily you can fix this. Simple mode: You just want to track all the page views Embed your Google Analytics code as always. Now add the following code snippet: up.on('up:location:changed', function(event) { ga('set', 'page', location.pathname); ga('send', 'pageview'); }); Hard mode: You want more control over what's being tracked First, edit your Google Analytics code snippet and comment out the last line (ga('send', 'pageview')): (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-1234567', 'auto'); // ga('send', 'pageview'); // Don't send the pageview here Now add the following compiler: up.compiler('[track-for-analytics]', function($element) { var url = $element.attr('track-for-analytics') || location.pathname;
...are not a typo. It's to prevent Ruby from interpolating the string at compile time. Rails is aware of this hack and will perform interpolation at runtime.
...stylesheets in public/sass/*.sass) and relied on stylesheet_link_tag to activate the Sass compiler. Now all Sass-generated stylesheets inserted the following text into body:before: Encoding::CompatibilityError: incompatible...
Rbenv won't compile REE 2011.03 properly on Ubuntu 12.04, failing with an error in tcmalloc.cc. If you want to keep tcmalloc functionality, you can do it like this:
...you might want to rebuild all gems with native extensions, because they might be compiled against outdated system libraries, resulting in some warnings or even segfaults or other ruby errors...
...file: No such file or directory - /home/henning/.rvm/gems/ruby-1.8.7-p358/gems/mysql2-0.3.11/lib/mysql2/mysql2.so (Because the library which is used to compile the gem doesn't exist anymore and you have to recompile it...
...also works for any other hash attribute. Consider an Angular directive or an Unpoly compiler that is configured by several attributes. Usually you'd prefix them with the directive/compiler name...
...an error must be very close to the network card, OS IP stack or compiler. In reality this is quite rare, so before continuing, triple-check that the issue is...
Gem nokogiri-1.4.4 hoe (>= 2.6.2, development) minitest (>= 1.6.0, development) racc (>= 0, development) rake-compiler (>= 0, development) rexical (>= 0, development) rubyforge (>= 2.0.4, development...
...Note that, like the vanilla bundle install, this will fail whenever a new gem compiles native components and requires a missing system dependency...
...with Haml 3.0.18 and fast_gettext 0.5.10. gettext_i18n_rails's Haml-Parser compiles the Haml code and delegates the parsing to ruby_parser. Unfortunately, ruby_parser appears to be...
Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use this: $ while(true) do haml index.haml index.html; sleep 1.5; done
...plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you can use \includegraphics for this. Although, be prepared to get tons of...
In medium-sized to large Rails applications, asset compilation can take several minutes. In order to speed up deployment, asset precompilation can be skipped. This card automates the process.
...namespace :deploy do desc 'Automatically skip asset compile if possible' task :auto_skip_assets do asset_locations = %r(^(Gemfile\.lock|app/assets|lib/assets|vendor/asset)) revisions = [] on roles :app do within current...
Opal is a source to source ruby to javascript compiler, corelib and a runtime implementation that currently passes 3000 rubyspecs w/a reachable goal of passing them all...
...t agree with all of Nico's choices, but I applaud his approach to compile a simple and short list of rules...
...fuck tests. So here’s fast_context as a solution for it. fast_context compiles all the ‘should’s within a context into a single test...