Skip to content

Instantly share code, notes, and snippets.

Working from home

humble_wolf humblewolf

Working from home
View GitHub Profile
import hashlib
import timeit
# hashing functions -------
def sha256fun(binp):
h = hashlib.sha256(binp)
return h.hexdigest()
humblewolf / ror_cheatsheet.txt
Last active December 10, 2020 11:15
Ruby on Rails Cheatsheet
View ror_cheatsheet.txt
About Rails ::
1. Rails is a web framework which tries to do the heavy lifting for us (like django in py), you just need to insert code-snippets/files at pre-defined places and you are done most of the times.
2. Everything revolves around a resource, A resource is anything that can be created, updated, viewed, listed, deleted etc via http apis. For ex: For a blogging application an article can be a resource.
3. It is MVC arch : Model-View-Controller
1. Contains the blueprint/skleton of the resource (for ex. Article => Title, Body, Date-of-creation)
2. Tightly in association with DB, Typically a db table is created for every model and you can modify the record in the table by calling methods on your model object