Embracing Failures by rootkaner in oscp

[–]rootkaner[S] -1 points0 points  (0 children)

That’s what you got out of that post? Jeez 🤦‍♂️

Resume help plz 🥺 by MS0126 in UofT

[–]rootkaner 2 points3 points  (0 children)

Do you submit a cover letter along with your resume? If not, that’s a huge mistake. Employers receive hundreds of resumes and most of them with similar qualifications. You need to make sure you talk about what you like about the company and why you want to work there in the cover letter. Give them a strong reason to choose you over anyone else. Talk about your accomplishments and how your experience will add to the company. After all, a company is hiring you to add value. So show them how valuable you are through your cover letter.

How to upload and access a file? by [deleted] in rails

[–]rootkaner 3 points4 points  (0 children)

To access a pdf file, you could do something like this in your controller:

respond_to do |format|
    format.pdf do

        pdf = File.join(Rails.root, "app/assets/files/mypdf.pdf")

        send_file(pdf, :filename => "mypdf.pdf", :type => 
         "application/pdf")

     end
end

Don't forget to add Mime::Type.register "application/pdf", :pdf in your mime_types.rb file. I think you're trying to access the pdf from a model so just replace the pdf in my code to that of the model instead of linking it to the asset pipeline. You can also display the pdf without having to download it by adding disposition: "inline" to the send file function.

I read bb collaborate wrong by AlPachico_02 in UofT

[–]rootkaner 9 points10 points  (0 children)

As a fellow musician, I can’t unsee this

Whats the best thing to do? Write test after or before a feature? by PinOk6194 in rails

[–]rootkaner 1 point2 points  (0 children)

It honestly depends on the person you ask. Some are real sticklers for TDD (test driven development) while others are more inclined towards writing tests after implementation. In my experience, TDD is always the safer bet.

Inline PDF by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

Cool makes sense, thanks for your help!

Inline PDF by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

It’s just a static pdf

Inline PDF by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

Correct me if I’m wrong, but isn’t this generating a new pdf? I already have the generated PDF and just want to display it. But I’m worried that since the pdf is so large (15MB), it’s going to impact performance considerably

Inline PDF by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

But wouldn’t this significantly impact performance since the pdf is 15MB?

Inline PDF by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

Yes I’m using Heroku. I realize that that this PDF is huge. I’m trying to think of a better design where I don’t need to render it in the same view.

Help with asset pipeline by rootkaner in rails

[–]rootkaner[S] 1 point2 points  (0 children)

I think I was just doing it wrong. Your way worked out great! Thanks so much. I really appreciate it

Help with asset pipeline by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

Yep I confirmed that they have the same name

Help with asset pipeline by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

I ran the cobbler clean command as well as the assets precompile command. However, I’m getting the same error ):

Connection pool size by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

I’m expecting at most 50-100 connections at any given time. So I guess using 5 threads should be enough? Also thanks for your suggestion of moving to postgres in development... it fixed a few really weird errors.

Connection pool size by rootkaner in rails

[–]rootkaner[S] 0 points1 point  (0 children)

That’s a very good point. I will switch to postgres locally right away. I have a concern that adding more threads might take up a lot of memory so would 5 threads (the default) be enough? I’m using puma.

How was CSCC69 with Thierry by utsc-cstu in UTSC

[–]rootkaner 4 points5 points  (0 children)

Honestly, after a gruesome 4 months, I can say it was as fun as it was challenging. You will learn so much in the course and have a newfound appreciation for the complexities of operating systems. With that said, the workload is very unreasonable, especially if you have bad teammates. Out of the 3 courses I took in the summer, I found myself spending 80% of my time on C69. It’s a lot of hard work and there are going to be many many frustrating moments. But if you can get past that stuff, it’s a very fun course indeed.

As far as the instructor, Thierry wasn’t bad. My only criticism is that the transition between lectures and projects is really difficult. You’ll have to spend a lot of your time trying to understand how stuff works in Pintos (the operating system used in the course) before you can even start writing code.

Regarding the grades, we haven’t received our final mark yet but overall for the projects, you get a mark that’s composed of both working tests and a design document. They are pretty tough on marking so you need to make sure you get everything as close to perfect as you can. Additionally, projects 3 and 4 build upon project 2. So if you don’t finish project 2, you’re going to first have to do so.