Skip to content

Instantly share code, notes, and snippets.

View jsgilberto's full-sized avatar
👋

Jesus Alvarez jsgilberto

👋
  • Hermosillo
View GitHub Profile
@jsgilberto
jsgilberto / login_required.py
Created May 28, 2021 08:26 — forked from robgolding/login_required.py
Django Class-Based View Mixins: Part 1
class LoginRequiredMixin(object):
"""
View mixin which requires that the user is authenticated.
"""
@method_decorator(login_required)
def dispatch(self, request, *args, **kwargs):
return super(LoginRequiredMixin, self).dispatch(
self, request, *args, **kwargs)

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@jsgilberto
jsgilberto / RAILS_CHEATSHEET.md
Created June 25, 2018 19:59 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before