...relaying information to input variables it's happening via environment variables. Depending on the size of the content of the variable it might exceed your OS limits. This is independent...

A possible workaround is to use a generated file to load the input instead of the env variable, e.g. # WORKAROUND # the variable my_huge_input cannot be...

...Sometimes you have search entries in the autocomplete of the address bar, which are higher weighted than your bookmarks. Pressing SHIFT + DEL while searching removes them from the history immediately...

...Sometimes you have search entries in the autocomplete of the address bar, which are all higher weighted than your recently visited sites. Add a search for your history, so you...

...we noticed your project(s) has not accessed or used the YouTube Data API Service in the past 60 days. For reference, your inactive project number is ... While projects do...

...only tell you its (generated) number. But if you use the API Console's search, you won't get any results for project numbers. Also, project numbers are not visible...

stackoverflow.com

I had some problems with Git and the file spec/fixtures/ČeskýÁČĎÉĚÍŇÓŘŠŤÚŮÝŽáčďéěíňóřšťúůýž. After pulling the latest commits, it would show that file as untracked, but adding and committing it would throw...

...unicode fixture file once again' did not match any file(s) known to git. Solution Install Git version > 1.8.2 using homebrew and set git config --global core.precomposeunicode true Done.

developer.mozilla.org

When building a form with a file select field, you may want to offer your users a live preview before they upload the file to the server. HTML5 via jQuery...

...Luckily, HTML5 has simple support for this. Just create an object URL and set it on an tag's src attribute: $('img').attr('src', URL.createObjectURL(this.files[0])) Unpoly Compiler

The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served to users in line with the General Data Protection Regulation...

...GDPR). This standard is called the TCF 2.0 (Transparency and Consent Framework). If you want to integrate any kind of advertising into a website, chances are the advertising network will...

...that happens on your local machine Manually remove the offending's gem files and specifications. The paths will be something like /usr/lib/ruby/gems/1.8/gems/your-broken-gem and /usr/lib/ruby/gems/1.8/specifications/your-broken-gem Update Rubygems or Slimgems by running...

...gem update --system Run bundler on your project to reinstall the offending gem. If this happens to your during deployment Ask your operations team to do it. After the update...

paperplanes.de

This post is not about devops, it's not about lean startups, it's not about web scale, it's not about the cloud, and it's not about continuous...

Let's say you have two XML strings that are ordered differently but you don't care about the order of attributes inside containers: a = ' batman secret ' b = ' secret batman...

...Working with plain string comparison is not helpful, of course: a == b => false Instead, you can use the Nori gem to convert your XML into a hash: xml_parser = Nori.new...

When you set both a record's association and that association's foreign key attribute, Rails does not realize you are talking about the same thing. The association change will...

...win in the next save, even if the foreign key attribute was changed after the association. As an example, assume you have these two models: class Group < ActiveRecord::Base

github.com

fake_stripe spins up a local server that acts like Stripe’s and also serves a fake version of Stripe.js, Stripe’s JavaScript library that allows you to collect your...

...customers’ payment information without ever having it touch your servers. It spins up when you run your feature specs, so that you can test your purchase flow without hitting Stripe...

makandra dev

Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with a larger font and bold, while it denotes "the single...

...single main content of a page nav for sets of navigation links article for independent, self-contained content section for sections like chapters, typically with a heading aside for content...

...needed a way to make my apps full screen from bash scripts. There is no super-easy way, but it's not too hard either. Put the attached script into...

...e.g. /usr/local/bin and make it executable. Now you can call fullscreen Safari and Safari will go full screen. Notes This script needs activated access for assisting devices. Turn it on...

apidock.com

...can be especially painful when external code (read: gems) uses const_defined? to look something up and gets different results on different Rubies. Consider this: module Foo FOO = 42

end On Ruby 1.8, Bar won't have FOO defined as a constant since that's (even though it's accessible): 1.8.7 > Foo.const_defined? :FOO => true 1.8.7 > Bar.const_defined...

...like invoices/generated?number=123. This could be your (very careless) controller method: def generated send_file File.join(Rails.root, 'shared', 'invoices', params[:number]) end This allows your users not only to...

...files but also any files your application can read, like this: invoices/generated?number=../../../../../etc/passwd # => send_file '/etc/passwd' You do not want this. In most cases you should prefer a show...

If you want to expand your Areca Raid by swapping out the disks for larger ones you will need to do the following: Swap out all disks one by one...

...and wait until the syncronisation is finished in between. Reboot your server and enter the Raid Controller Configuration by pressing TAB at the right time. In the menu go the...

makandra dev

...capistrano_colors' end It's possible you need to do a bundle update net-ssh to get things running. Now double check that all your custom hooks are actually still...

...called. One candidate might be an after deploy:symlink hook that has been renamed into after deploy:create_symlink. I also suggest to put a safeguard into your deploy.rb that...

...common providers like the AWS one can quickly add up to a lot of storage space wasted. Each root module will download a copy of the same provider file. The...

...AWS provider is over 200 MB in size. To avoid creating multiple copies of the same file, you can use the Terraform Plugin Cache. Configuring the plugin cache:

makandra dev
activestate.com

...and a damaged reputation. Deploy Ruby with confidence knowing you're using the most secure, enterprise-grade builds for the platforms that power your business. You'll get priority access...

...fail-safe Ruby for business applications, but don't require advanced features like indemnification or site-wide licensing. Business Edition customers trust ActiveState's guaranteed technical support and regular fixes...

...your remote database, you might not want it to dump each time you deploy (say, you're experimenting with staging and don't want ten dumps an hour). How to...

...skip dump creation: Capistrano 2 In your Capistrano file: before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump, false) The second parameter of fetch sets a default value if...

...association. For example you can put the blank form on top with the following snippet: actors = movie.actors actors.build actors.unshift(actors.pop(1)) # won't work with Rails 4+ Because build_for...

...one-to-many association collection object you only have to reorder the collection objects. Sorting with Rails 3+ = form.fields_for :children, @parent.children.sort_by(&:name) do |fieldsform...

You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details attribute? is generated for all attributes and not only for boolean...

...These methods are using #query_attribute under the hood. For more details you can see ActiveRecord::AttributeMethods::Query. In most circumstances query_attribute is working like attribute.present?. If your attribute...

...OPTS="--no-tcmalloc" rbenv install, but that would disable tcmalloc. Doing that, you might still encounter issues with ossl_ssl.c -- which is where I switched to the patched solution above...

...without_callbacks. There is no such thing in vanilla Rails 3. There is a gem sneaky-save that restores the missing functionality with a #sneaky_save method...