Skip to content

Instantly share code, notes, and snippets.

View mkezfarias's full-sized avatar
🤠
Wears many hats*

Luis Puente mkezfarias

🤠
Wears many hats*
View GitHub Profile
Rails.application.routes.draw do
# generated by scaffold to take care of all the methods for subjects
resources :subjects
# sends a get request to the show method in the sessions controller
get '/sessions', to: 'sessions#show'
# sends a post request to the show method in the sessions controller with a parameter passed from the view
post '/sessions', to: 'sessions#show', as: :sessions_show
# sends the root to the landig page
root 'welcome#index'
<% if @clicked %>
<script crossorigin src="https://unpkg.com/@daily-co/daily-js"></script>
<script>
if (window.innerWidth <= 400) {
callFrame = window.DailyIframe.createFrame({
showLeaveButton: true,
iframeStyle: {
position: 'fixed',
bottom: 0,
<%# This is the title, responsive for small screens and bigger screens %>
<h1 class= "h3 ml-3 my-5 text-light d-block d-md-none" > Select a topic to <br> start your call </h1>
<h1 class= "h3 ml-3 my-5 text-light d-md-block d-none" > Select a topic to start your call </h1>
<%# This is the list of the subjects that we got from the @subjects variable, and we are creating a table with all of them! %>
<%# All of the sessions will use the same room for now to keep it simpler %>
<ul cass="list-group list-group-flush bg-transparent">
@mkezfarias
mkezfarias / tech-me-routes.rb
Last active February 17, 2020 04:25
tech-me-routes.rb
Rails.application.routes.draw do
# generated by scaffold to take care of all the methods for subjects
resources :subjects
# sends a get request to the show method in the sessions controller
get '/sessions', to: 'sessions#show'
# sends a post request to the show method in the sessions controller with a parameter passed from the view
post '/sessions', to: 'sessions#show', as: :sessions_show
# sends the root to the landig page
root 'welcome#index'
<div class="bgbg">
<div class="row mx-0">
<div class="col-xl-5 col-lg-5 col-12 mt-5">
<h1 class="h1 text-light offset-1 pb-4 mb-2"> Welcome to TechMe </h1>
<div class="h3 offset-1 mt-2 text-light pb-lg-4"> Learn programming with experienced devs trough live video sessions. </div>
<div class="h3 offset-1 mt-4 text-light pb-lg-3"> Get your first session free. </div>
<%= link_to 'Start my free session', sessions_path, class: "btn btn-light mt-4 offset-1 mt-2 text-strong font-weight-bolds" %>
</div>
</div>
<div>
@mkezfarias
mkezfarias / bootstrap_cdn.html
Last active February 18, 2020 05:55
bootstrap cdn
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
@mkezfarias
mkezfarias / _navbar.html.erb
Last active February 18, 2020 06:37
bootstrap navbar
<nav class="navbar navbar-expand-lg navbar-light bg-blue">
<a class="navbar-brand text-light" href="/">TechMe</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link text-light" href="/">Home <span class="sr-only">(current)</span></a>
<nav class="navbar navbar-expand-lg navbar-light bg-blue">
<a class="navbar-brand text-light" href="#">TechMe</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link text-light" href="#">Home <span class="sr-only">(current)</span></a>