Skip to content

Instantly share code, notes, and snippets.

View teevyne's full-sized avatar
💭
Math + Statistics; ML; Backend Dev

Tolulope Ayemobola teevyne

💭
Math + Statistics; ML; Backend Dev
View GitHub Profile
@zulhfreelancer
zulhfreelancer / heroku_pg_db_reset.md
Last active June 17, 2024 11:44
How to reset PG Database on Heroku (for Rails app)?

It's important to note that running this reset will drop any existing data you have in the application

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

@yaswanthrajyadiki
yaswanthrajyadiki / Item.java
Last active November 22, 2023 08:43
This is Shopping Cart Code
class Item {
private String productName;
private int quantity;
private double unitPrice;
Item(String productName, int quantity, double unitPrice) {
this.productName = productName;
this.quantity = quantity;
this.unitPrice = unitPrice;
}
public String toString() {