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
#!/bin/bash | |
# Programa para instalar nginx en un servidor linux | |
# Autor: Dalthon dalthonmh@gmail.com | |
echo "Instalando nginx" | |
sudo apt update | |
sudo apt install nginx -y | |
sudo systemctl restart nginx | |
sudo systemctl enable nginx | |
echo "DONE" |
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
#!/bin/bash | |
# Name: sleep-demo.sh | |
# Purpose: bash script examples that demos sleep command | |
# Author: Vivek Gite {https://www.cyberciti.biz} | |
# ----------------------------------------------------------- | |
SLEEP_TIME="10" | |
echo "Current time: $(date +%T)" | |
echo "Hi, I'm sleeping for ${SLEEP_TIME} seconds ..." | |
sleep ${SLEEP_TIME} | |
echo "All done and current time: $(date +%T)" |
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
/** | |
* 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" |
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
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 |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name _; | |
root /var/www/dist; | |
index index.html; | |
location / { |
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
#!/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 ../ |
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
#!/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 ../ |
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
[ | |
{ | |
"order-detail": [ | |
{ | |
"category": "fund", | |
"_id": "5e606408dc8aec3040688a86", | |
"name": "Lomo saltado", | |
"price": 20, | |
}, | |
{ |
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
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); |
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
[ | |
{ | |
"_id": { "$oid": "5e8186aa5d750a38e4260fcc" }, | |
"order_detail": [ | |
{ "$oid": "5e606408dc8aec3040688a86" }, | |
{ "$oid": "5e6066bea0403411bc4a3333" } | |
], | |
"date": { "$date": { "$numberLong": "1583902800000" } }, | |
"table": { "$numberInt": "1" }, | |
"__v": { "$numberInt": "0" } |
NewerOlder