Best non-paperclip solution for S3?
There was a question about uploading to S3 on an iOS project backed by non-rails ruby.
Best practice (Rails or not) seems to be using the AWS gem to generate URLS, send those to the phone, and do all the manipulation and uploading from the device.
Tuesday: Homefrys Ping Pong Tournament!!!!!!!
Ping pong tournament with other startups @ Pivotal Labs. We have 2 teams made up of: Palermo and Phan, and Michael and Danny. Come cheer us on!
XP at Pivotal Labs
Will Read & ex-pivot Josh Susser talk with folks like Avdi Grimm about XP and what it looks like at Pivotal Labs. ~1hr.
ciborg and passphrase on key file
If you have a password on the keyfile lobot is using for git, jenkins will fail to checkout
ciborg and id_rsa
ciborg always upload the keyfile as id_rsa even if yours has a different name, it copies the correct file but drops it as id_rsa and has the reference to your correct name in the ciborg.yml.
Easily access view helpers from your controller, without including modules. Use view_context.some_url_helper for example.
Using controller in presenters
Sometimes you need to use the controller / view_context to access methods you could not in the presenter.
When it's the case, don't put them as a parameter of the method that need them.
This is not a value object (remember Domain Driven Design? :), this is a dependency you should inject when creating your presenter.
Faraday multipart doesn't work?
Yesterday we were trying to send multipart requests with Faraday. It doesn't work. Why?
Rspec after's run in reverse order
Not that you should probably ever have multiple after blocks at the same level, but we found out when collapsing multiple after blocks down into a single one, that the teardown happened in the opposite order than the order in which the after's were declared
Monday: SF Lunch Tech Talk
We're going to watch: "The Value of Values" by Rich Hickey.
Alexander has transferred the super powers. So send suggestions to me or add it to the wiki page: https://sites.google.com/a/pivotallabs.com/pivotalwiki/officesandfacilities/sanfranciscooffice/sf-lunch-videos
Not all PNGs are created equal
If you write a UIImage’s PNG representation to disk, read it back, and get the PNG representation again, you’ll get a different representation. In our case, we got 21 extra octets after the PNG header.
NSData *png1 = UIImagePNGRepresentation(image1);
[png1 writeToFile:file atomically:YES];
UIImage *image2 = [UIImage imageWithContentsOfFile:file];
NSData *png2 = UIImagePNGRepresentation(image2);
// png1 and png2 differ by 21 octets
If you're using date/time formats in Ruby, Python, C or PHP, this website is pretty slick for testing your formats.
heroku_san + ruby 2.0
If you are using heroku_san with a ruby 2.0.0 app and you get deployment failures and the message is:
"Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0"
You need to edit /usr/local/heroku/bin/heroku
and change the shebang line:
So that the heroku toolbelt runs with the ruby version invoked locally in your rbenv/rvm environment.
Ruby enforces that any assignment returns the RHS. Or at least it does when you call it normally.
Foo.new.bar = "sup"
(looks like its fixed in newer versions of 2.0)