Skip to content

Instantly share code, notes, and snippets.

View vampaynani's full-sized avatar
🏠
Working from home

Wenceslao Negrete vampaynani

🏠
Working from home
View GitHub Profile
@vampaynani
vampaynani / active_storage.md
Created August 25, 2021 08:55
Setup Active Storage

Implement Active Storage

Uncomment gem "image_processing", ">= 1.2" on Gemfile.

Run bundle install.

Run rails active_storage:install to generate a migration, it will create 3 tables: active_storage_blobs, active_storage_variant_records and active_storage_attachments.

Run rails db:migrate.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.completed{
text-decoration: line-through;
}
@vampaynani
vampaynani / colors.css
Created October 19, 2020 23:26
Colors container
.colors-container {
overflow: hidden;
}
.color-container {
overflow: hidden;
float: left;
}
.color_circle {
display: block;
border-radius: 50%;
@vampaynani
vampaynani / code.css
Created October 19, 2020 23:11
HTML code
.code {
background: var(--grey-color);
padding: 2em;
}
.code_line {
display: block;
}
.code_line--tag {
@vampaynani
vampaynani / index.html
Last active October 19, 2019 01:44
Initial HTML for jQuery practice
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
@vampaynani
vampaynani / index.html
Last active October 9, 2019 05:56
Ejercicio de Flexbox
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
section{
min-height: 100vh;
}
@vampaynani
vampaynani / mergesortLinkedList.js
Created August 1, 2019 20:50
How to apply merge sort on a single linked list
class Node{
constructor(value){
this.value = value;
this.next = null;
}
}
class LinkedList{
constructor(value){
this.head = value ? new Node(value): null;
@vampaynani
vampaynani / config.js
Created May 6, 2019 18:34
Simple Uploader
module.exports = {
PORT: process.env.PORT || 3000
}
@vampaynani
vampaynani / now.json
Last active April 10, 2019 19:33
Now.json file for react-app deployment
{
"version": 2,
"alias": "my-new-react-app",
"name": "my-react-app",
"builds": [
{
"src": "package.json",
"use": "@now/static-build",
"config": { "distDir": "build" }
}
@vampaynani
vampaynani / questions
Last active February 4, 2019 17:41
Set of questions to pass the programming fundamentals phase
Qué es una variable?
Qué es una variable global?
Qué es una variable local?
Qué es una función?
A qué nos referimos con declarar una función?
A qué nos referimos con invocar una función?
Qué es un argumento?
Para qué sirve una declaración if?
En qué situaciones usamos un ciclo for?
En qué situaciones usamos un ciclo while?