Skip to content

Instantly share code, notes, and snippets.

View hilava's full-sized avatar

Hila Vaisler hilava

View GitHub Profile
@hilava
hilava / Python.md
Last active May 4, 2019 01:45
Python

Python programming language

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java.

##Python's core philosophy includes:

  • Beautiful is better than ugly
  • Explicit is better than implicit
  • Simple is better than complex
  • Complex is better than complicated
@hilava
hilava / acts_as_votable.md
Last active November 9, 2017 20:30
Acts As Votable (aka Acts As Likeable)

#Acts As Votable (aka Acts As Likeable)

Acts As Votable is a Ruby Gem specifically written for Rails/ActiveRecord models. The main goals of this gem are:

  • Allow any model to be voted on, like/dislike, upvote/downvote, etc.
  • Allow any model to be voted under arbitrary scopes.
  • Allow any model to vote. In other words, votes do not have to come from a user, they can come from any model (such as a Group or Team).
  • Provide an easy to write/read syntax.

##Steps