We just made this pull request to Timecop:
"Add Timecop#lens where time can go FASTER"
Create a new mock_type, :lens which will let time continue, like :travel, but the first argument is a scaling factor which will make time move at an accelerated pace.
- Slow count after delete_all of millions of records?
- font icons, Ajax, and IE8
Our application is using Font-Awesome to display some of our icons. One of our modals that has its content loaded via Ajax is rendered in IE8 without any of these icons visible. Clicking any element that contains these icons will make them instantly appear.
Is there a known issue with IE8 not properly applying CSS :before rules to content fetched with Ajax? Or could it be a known issue with how it handles fonts? Any ideas?
- Ember.js talk @ Zendesk - Tuesday 6:00pm
- ActiveAdmin after_save
If you are using ActiveAdmin, beware that the
after_save callback gets fired both when the model gets saved, and when there are validation errors on the model.
It really behaves like a callback after the model
save method gets called, regardless of its return value.
- Testing RailsAdmin custom actions
Let's say you're writing a RailsAdmin custom action, and you want to test it with a request spec.
If the test passes when guard is on, but fails when guard is off, then you've forgotten that the RailsAdmin initializer does not run when loading a rake task. It does run as part of bundle exec guard start.
This is a performance 'optimization' that RailsAdmin adds.
To turn it back on, so you can test custom actions:
task :default => [:load_rails_admin_initializer] task :load_rails_admin_initializer do ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = 'false' end
- International Talk Like a Pirate Day!
Arrrgggggg me mateys! To your pairs you scabrous dogs!
Ask for Help
*"1 git repo, 2 Heroku apps, 2 procfiles? Heroku currently is limited to 1 procfile per repo, so we've created a rake task that branches, modifies the procfile and pushes. Do you have a better solution?"
Is it possible to use env variables to parameterize your Procfile?
"Capybara: How can I click on a flash dialog for webcam settings?"
This was solved by right clicking and going into flash settings and enabling this permission always for this domain. Setting this up on headless CI may be more difficult.
"I have CSS transitions that behave differently when 'user initiated' vs initiated from a setTimeout or other event."
Ask for Help
"CarrierWave is messy leaving files in the tmp directory when running tests. Is rm -rf the best answer?"
"While the we love Rails, we don't need it, we just want its asset packaging features. Some suggest using sprockets. Do you have other suggestions?"
*Gem Maintainers: use LicenseFinder to save users of your gem the hassle of digging through your gem to figure out what license your gem is distributed under.
"How do I choose the value of a select box programmatically? The val function does not seem to do the trick."
Try setting the desired option as selected and then trigger a change event on the select input.
*"A pair is looking for 'multi file upload via iframe-transport' expertise. Specifically uploads in FireFox 3.6."
- The latest RubyMine EAP has improved code formatting options!
Ask for Help
"Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!"
It doesn't answer why your job is using so much memory, but check out activerecord-import.
- Pivotal SF will be hosting a Tracker Users Group meetup tonight. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.
The simpler solution (workaround?) is to use loadDataWithBaseURL(String, String, String, String, String). Calls to this method do not require escaping. Pass along a garbage base url (or null), and an empty or null history url for success and profit.
webView.loadDataWithBaseURL("blarg://ignored", getData(), "text/html", "utf-8", "");
Web development spoiled me. Set the src tag on an img tag and away you go. For the most part, browsers just do the right thing and cache these requests. Disappointingly, Android does not come with out of the box support for caching content downloaded from the network. Server apis often require SSL, request headers, support for different HTTP methods, multipart post bodies, etc. requiring the use of the apache http client libraries. These libraries are powerful, but are a bear to work with. As far as I can tell there is no support for caching http responses built into the apache libraries, requiring that you roll your own caching scheme. Images often do not have all these complicated HTTP requirements. They're usually simple HTTP GET calls. This makes the java.net.* libraries appealing. The java.net libraries come with some handy classes that makes caching a breeze.