Skip to content

Instantly share code, notes, and snippets.

View dalthonmh's full-sized avatar
🔥
Code code code

Dalthon dalthonmh

🔥
Code code code
View GitHub Profile
@dalthonmh
dalthonmh / tailwidncss-background-linear-gradient.jsx
Created August 30, 2022 18:34
Tailwindcss background linear gradient image
/**
* Tailwindcss background linear gradient image
* "tailwindcss": "^3.1.8"
* dalthonmh
*/
function MyCard({ grupo }) {
const { number, name, numberOfPrograms, image, color } = grupo;
return (
<div
className="w-full h-96 bg-no-repeat bg-cover relative rounded-lg"
@dalthonmh
dalthonmh / gist:aba62d853dcaceb294e2080d2517de51
Created March 26, 2022 13:16
Install Docker on Windows (WSL) without Docker Desktop...Easy steps!!!
wsl -l -v
wsl --set-version Ubuntu 2
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common libssl-dev libffi-dev git wget nano
sudo groupadd docker
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/dist;
index index.html;
location / {
#!/bin/bash
# must enable execution permission with:
# sudo chmod 774 deploy.sh
echo Deploying app...
git pull origin dev
yarn build
rm -r ../build
cp -r build ../
#!/bin/bash
# must enable execution permission with:
# sudo chmod 774 deploy.sh
echo Deploying app...
git pull origin dev
yarn build
rm -r ../dist
cp -r dist ../
@dalthonmh
dalthonmh / response.json
Created March 31, 2020 00:09
Mongo Seeding CLI | examples/import-data-json/response.json
[
{
"order-detail": [
{
"category": "fund",
"_id": "5e606408dc8aec3040688a86",
"name": "Lomo saltado",
"price": 20,
},
{
@dalthonmh
dalthonmh / getOrders.js
Last active March 31, 2020 01:30
Mongo Seeding CLI | examples/import-data-json/getOrders.js
const Order = require("../models/order");
const Plate = require("../models/plate");
function getOrders(req, res) {
Order.find({}, (err, order) => {
if (err) {
throw err;
} else {
Plate.populate(order, { path: "order_detail" }, (err, order) => {
res.status(200).send(order);
@dalthonmh
dalthonmh / Orders.json
Created March 31, 2020 00:07
Mongo Seeding CLI | examples/import-data-json/data/orders.json
[
{
"_id": { "$oid": "5e8186aa5d750a38e4260fcc" },
"order_detail": [
{ "$oid": "5e606408dc8aec3040688a86" },
{ "$oid": "5e6066bea0403411bc4a3333" }
],
"date": { "$date": { "$numberLong": "1583902800000" } },
"table": { "$numberInt": "1" },
"__v": { "$numberInt": "0" }
@dalthonmh
dalthonmh / Plates.json
Created March 31, 2020 00:06
Mongo Seeding CLI | examples/import-data-json/data/plates.json
[
{
"_id": { "$oid": "5e606408dc8aec3040688a86" },
"name": "Lomo saltado",
"price": 20.00,
"category": "fund"
},
{
"_id": { "$oid": "5e60650ea0403411bc4a332f" },
"name": "Arroz con pollo",
@dalthonmh
dalthonmh / Users.json
Created March 31, 2020 00:04
Mongo Seeding CLI | examples/import-data-json/data/users.json
[
{
"_id": { "$oid": "5e601e82b3f2a43b5477b647" },
"name": "Dalthon",
"lastname": "Mamani",
"username": "D4ITON",
"password": "$2a$10$hhn8vSvl6rpv42undbkQ.O5XIdIJkujyqQWqKIxRJgLQYCGlM/6rW",
"role": "admin"
},
{