Skip to content

Instantly share code, notes, and snippets.

View Jamp's full-sized avatar

Jaro Marval Jamp

View GitHub Profile
@Jamp
Jamp / docker-credential.sh
Created September 12, 2023 16:16
Llevar una sesión docker a kubernetes
kubectl create secret docker-registry --dry-run=true docker-regcred \
--docker-server=https://index.docker.io/v1/ \
--docker-username=xxx \
--docker-password=xxx \
--docker-email=yourmail@yourdomain.com \
--namespace=xxx \
-o yaml > docker-secret.yaml
@Jamp
Jamp / pre-install.sh
Last active March 11, 2022 03:36
Show Stats Raspberry PI with Python
#!/bin/bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential python3-dev python-smbus i2c-tools python3-pil python3-pip python3-setuptools python3-rpi.gpio git
pip install psutil netifaces requests
@Jamp
Jamp / Instructions.md
Last active December 10, 2021 21:24
See Emojis Full Color Manjaro XFCE

Steps

  1. Install Noto Emojis Fonts sudo pacman -S noto-fonts-emoji
  2. Create /etc/fonts/local.conf
  3. Copy and paste content
  4. Run fc-cache (Maybe reboot required)
  5. Test with https://getemoji.com/
@Jamp
Jamp / queue.py
Created June 29, 2021 22:16
Organizar la pea con la cola
queue = []
queue.append(1)
queue.append(2)
queue.append(3)
queue.append(4)
queue.append(5)
print(queue)
@Jamp
Jamp / Dockerfile
Created April 6, 2021 00:03
Dockerfile VueJS Desarrollo Local
FROM node:latest
RUN mkdir -p /app
WORKDIR /app
COPY package*.json .
RUN npm install
COPY . .
@Jamp
Jamp / Dockerfile
Created April 5, 2021 17:48
Dockerfile VueJS Producción - Sacada de la documentación de VueJS
FROM node:latest as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build
FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
@Jamp
Jamp / .env
Last active June 15, 2020 21:24
Cargar variables entorno
MONGODB_URL=xxxx
POSTGRESQL_URL=xxxx
API_URL=xxxx
PROXY_URL=xxxx
CLIENT_ID=xx
@Jamp
Jamp / async_await_request.html
Last active April 12, 2020 16:43
Ejemplo simple de como hacer solicitudes con sincronas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update Productos</title>
</head>
<body>
<!-- Código simple para hacer solicitudes sincronas -->
@Jamp
Jamp / aws.conf
Created June 27, 2019 01:45
Serve all PDF Files on S3 with Nginx and Proxy Reverse(remember give public access on files en S3)
location ~ \.pdf {
try_files $uri $uri/ @aws;
}
location @aws {
proxy_pass https://<bucket_name>.s3.amazonaws.com;
proxy_set_header Host "<bucket_name>.s3.amazonaws.com";
proxy_set_header Authorization '';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-storage-class;
@Jamp
Jamp / nodejs-app.conf
Created May 20, 2019 18:03
Nginx Proxy Reverse for NodeJS App with SSL Letsencrypt
upstream nodejs-app {
server 127.0.0.1:3000;
keepalive 64;
}
# Server on port 80
server {
listen 80;
server_name app.nodejs.com;
root /app;