Skip to content

Instantly share code, notes, and snippets.

View nmcolome's full-sized avatar

Natalia Colomé nmcolome

View GitHub Profile
@nmcolome
nmcolome / nc_prework.md
Last active February 14, 2017 07:06 — forked from mbburch/prework.md
An example template for your Turing pre-work Gist

Turing School Prework - Natalia

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

Guiding Questions to Define The Relationship:

What are your learning goals for this project?

Natalia: Extraction and analysis of information from files. Remember to do TDD

Charlie: Keep it organized. Aim for fully functional.

What is your collaboration style? How do you feel about pair programming vs. divide-and-conquer approaches?

Part I: User Creation

  1. add route for new_user_path
  2. create a UsersController with new action
  3. create new.html.erb
  4. generate user model with password_digest string field
  5. uncomment gem 'bcrypt' in Gemfile and add has_secure_password in User model
  6. add create action in UsersController
  7. implement logic for creating a user
  8. set session[:user_id] in create action
@nmcolome
nmcolome / warm-up.markdown
Last active May 24, 2017 15:31 — forked from case-eee/warm-up.markdown
Authentication Warm Up

Fork this gist and answer the following questions.

  • What's the difference between Authentication and Authorization?

Authentication is to verify that the user is who he says he is; Authorization is to validate if the user can access certain paths/actions or not (what do you have privilege to).

  • Why are both necessary for securing our applications?

They are both needed because they validate different things inside an application, so we want the right people to access the right information.

@nmcolome
nmcolome / friendly_urls.markdown
Created June 3, 2017 03:38 — forked from jcasimir/friendly_urls.markdown
Friendly URLs in Rails

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

@nmcolome
nmcolome / rails_setup.markdown
Created July 15, 2017 22:57 — forked from NicholasJacques/rails_setup.markdown
Getting Started with RSpec and Rails:

Getting Started with RSpec and Rails:

Setting up a new Ruby on Rails project using RSpec, Cabybara, FactoryGirl and DatabaseCleaner

What will this tutorial do you for you?

This tutorial will help guide you through the process of setting up a new Ruby on Rails project with robust testing capabilities. This tutorial makes a couple of assumptions:

  • You have installed Ruby on Rails and have a rudimentary understanding of how to use it.
  • You have installed bundler

Week One - Module 3 Recap

Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week (which is a TON!).

Note: When you're done, submit a PR.

  1. What is json, what does it stand for, and why is it important?
  2. What kind of object is JSON in Ruby? How do we know it's JSON?
  3. What's the difference between joins and includes in ActiveRecord?
  4. What's an API?
@nmcolome
nmcolome / pre-mod-4-reflection.md
Last active August 7, 2017 18:17 — forked from case-eee/pre-mod-4-reflection.md
These are reflection questions for students entering backend module 4.

M4 Reflection

Fork this gist and answer these questions to reflect on your learning experiences.

  • What brought you to Turing?

I wanted to change into a career that would allow me to have different challenges constantly, where I could problem solve and build solutions for others in an efficient way. I chose Turing because in my experience, it's not just about how good you are, it's also about how well you work with others and I was really happy to see that Turing is focused on not just teaching you to code, but to be part of a community and to collaborate with others (which I believe it's the most important factor in any job).

  • Where do you see yourself after Turing?
@nmcolome
nmcolome / python_tests_dir_structure.md
Created May 24, 2020 06:07 — forked from tasdikrahman/python_tests_dir_structure.md
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py