Cheatsheets

Post concise notes that can be used for quick reference here!

Accept credit card payments on your website

https://stripe.com/docs/payments/checkout/client

  • Updated 18 days ago by vince
Host a website for free on Amazon S3 with SSL

Create a bucket called www.example.com. It's not necessary but I also recommend turning on versioning so it's possible to rollback changes Properties > Static website hosting > Turn on Permissions ...

  • Updated 21 days ago by vince
Replace batteries for Mazda remote control key fobs

Buy a CR2025 (https://www.amazon.com/Duracell-Lithium-Battery-Lasting-Count/dp/B07G7L5M4J/ref=sr_1_14?crid=1RO433C45NHZ6&keywords=cr2025+battery&qid=1557267362&s=gateway&sprefix=CR2025+%2Caps%2C218...

  • Updated about 1 month ago by vince
Cancel subscription on iphone

Go to Settings > [your name] > iTunes & App Store. Tap your Apple ID at the top of the screen, then tap View Apple ID. You might need to sign in with your Apple ID. Scroll to Subscriptions, then ta...

Getting Adobe CS5 to work on Mojave

I don't need the new version or want pay a monthly fee and I'm happy enough with CS5 but it does crap out on you if you do a regular installation. Here's how I got photoshop, illustrator, and premi...

  • Updated 5 months ago by vince
Google Analytics with Rails 5 and Turbolinks

Go (https://analytics.google.com/analytics) to Admin > Property > Tracking Info > Tracking Code to get your 'UA-xxxxxxx-x' apps/views/application/_analytics.html.erb ```javascript <% if Rails.env.p...

  • Updated 5 months ago by vince
Authentication in Rails

If you want to roll out your own authentication in Rails this should get you going /app/controllers/concerns/authenticate.rb ```ruby module Authenticate extend ActiveSupport::Concern protected ...

  • Updated 5 months ago by vince
Using Rouge with Redcarpet

Gemfile ruby gem 'redcarpet' gem 'rouge' application_helper.rb ```ruby def markdown(text) options = { filterhtml: true, hardwrap: true } extensions = { autolink: true...

  • Updated 5 months ago by vince
Running Rake tasks

An example of a rake task that skips updating the updated_at column. To run this rake task type: rake maintenance:move_topics RAILS_ENV=production /lib/tasks/maintenance.rake ```ruby namespace :mai...

  • Updated 5 months ago by vince
Postgres and Heroku backups

Dump To dump and download a Heroku Postgres db heroku pg:backups:capture heroku pg:backups:download To dump directly from your Heroku database pg_dump --host=<host_name> --port=<port> --username=<u...

  • Updated 5 months ago by vince