Skip to content

Instantly share code, notes, and snippets.

View libsyz's full-sized avatar

Miguel Jimenez libsyz

  • Le Wagon
  • Singapore
View GitHub Profile
def calculate_product(arr)
# your code here
end
# define a method that takes an array of positive integers,
# and returns a new array that for each element
# contains the product of all other elements
# except the element in the original array
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)
require 'faker'
Comment.destroy_all
@libsyz
libsyz / style.css
Last active June 6, 2020 10:43
htmx to-do app css
.main {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 36px;
margin: 200px;
}
.list {
margin-bottom: 10px;
@libsyz
libsyz / lw_rails_front_end_set_up.rb
Last active March 12, 2020 08:13
Le Wagon Front End SetUp
# This is a script for setting up the front end of Rails App
# run this file from your root folder with ruby right after doing rails new
`yarn add bootstrap`
`yarn add jquery popper.js`
`echo "gem 'simple_form'" >> Gemfile`
`bundle install`
`rails generate simple_form:install --bootstrap`
`rm app/assets/stylesheets/application.css`