This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller } from 'stimulus'; | |
export default class extends Controller { | |
static targets = ['menu', 'button']; | |
static values = { open: Boolean }; | |
connect() { | |
this.toggleClass = this.data.get('class') || 'hidden'; | |
this.visibleClass = this.data.get('visibleClass') || null; | |
this.invisibleClass = this.data.get('invisibleClass') || null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useCallback } from "react"; | |
import MoviesList from "./components/MoviesList"; | |
import "./App.css"; | |
import AddMovie from "./components/AddMovie"; | |
function App() { | |
const [movies, setMovies] = useState([]); | |
const [isLoading, setIsLoading] = useState(false); | |
const [error, setError] = useState(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'json' | |
require 'uri' | |
require 'net/http' | |
require 'date' | |
# rubocop:disable Metrics/ClassLength | |
class EventsController < ApplicationController | |
before_action :find_event, only: [:show] | |
before_action :c_user, only: [:show] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "open-uri" | |
require 'json' | |
require "uri" | |
require "net/http" | |
require 'date' | |
puts "I've attached the API Seeds File !! " | |
## get the first access token | |
def get_initial_token | |
client_id_key = ENV["MEETUP_KEY"].to_s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="map" style="height: 40vh; background-image: url('https://images.unsplash.com/photo-1494526585095-c41746248156?w=1200')"></div> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-8 margin-top-negative"> | |
<div class="card py-3 my-3" style="width: 100%;"> | |
<div class="card-body "> | |
<h2 class="card-title"> | |
<%= @cocktail.name %> | |
</h2> | |
<h6 class="card-subtitle mb-2 text-muted"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# METHODS | |
i String#upcase | |
# https://www.foragoodstrftime.com/ | |
# https://www.shortcutfoo.com/app/dojos/ruby-dates/cheatsheet | |
require 'date' | |
def days_to_xmas | |
x_mas = DateTime.new(2020,12,25) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Weather</title> | |
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> | |
<title>Geocoder</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> | |
<title>Geocoder</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: Write your JS code in here | |
// | |
// | |
import mapboxgl from 'mapbox-gl'; | |
// select the form | |
const submit = document.querySelector('#form'); | |
const address = document.querySelector('#address'); | |
const geoCords = document.querySelector('#geo_cords'); | |
// get the users address | |
submit.addEventListener('submit', (event) => { |
NewerOlder