Skip to content

Instantly share code, notes, and snippets.

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

Ernesto Vargas netoxico

🏠
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@netoxico
netoxico / example.md
Created August 21, 2024 02:55 — forked from wiseman/example.md
Get store hours from images
$ python hours.py image.jpg
{
  "day_hours": [
    {
      "day": "Mon - Fri",
      "hours": "7 AM - 5 PM"
    },
    {
 "day": "Saturday",
@netoxico
netoxico / function.js
Created February 24, 2024 03:42 — forked from czue/function.js
OpenAI function for Source Citations in a RAG architecture
{
"name": "answer_and_sources",
"description": "Gets an answer and cites the relevant sources used to provide the answer.",
"parameters": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"description": "The answer to the user's question.",
},
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/default-backend.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/tcp-services-configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/udp-services-configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/with-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/baremetal/service-nodeport.yaml
kubectl get svc -n ingress-nginx
sudo sysctl net.bridge.bridge-nf-call-iptables=1
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.10.0/Documentation/kube-flannel.yml
PUBLIC_IP=$(ip -f inet -o addr show eth0|cut -d\ -f 7 | cut -d/ -f 1 | head -n 1)
sudo kubeadm init --apiserver-advertise-address=$PUBLIC_IP --pod-network-cidr=10.244.0.0/16
#!/bin/bash
sudo su
echo "Initializing docker service ..."
systemctl enable docker && systemctl start docker
echo "Docker service initialized successfully."
echo "Installing CNI ..."
CNI_VERSION="v0.6.0"
mkdir -p /opt/cni/bin
@netoxico
netoxico / K8s-DigitalOcean-CoreOS.md
Created September 26, 2018 03:24 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
a:5:{i:1;a:0:{}i:3;a:3:{s:5:"title";s:0:"";s:4:"text";s:117:"Teléfonos:
Oficina: +52 (867) 715 7420
Cel desde México: (045 867) 129 98 71
Cel desde EUA: +521 (867) 129 98 71";s:6:"filter";b:1;}i:4;a:3:{s:5:"title";s:0:"";s:4:"text";s:277:"Siguenos:<br>
<a href="https://www.facebook.com/Mujeres-de-Sol-y-Agave-AC-1067595603251494" target="_blank" class="liga-facebook"><img src="www.mujeresdesolyagave.com.mx/wp-content/uploads/2016/09/facebook.png" width="20" height="20" alt=""/> Mujeres de Sol y Agave AC</a>";s:6:"filter";b:1;}i:5;a:3:{s:5:"title";s:0:"";s:4:"text";s:56:"Correo electrónico:
[email protected] ";s:6:"filter";b:1;}s:12:"_multiwidget";i:1;}
a:101:{s:23:"2_5_flush_rewrite_rules";s:4:"done";s:25:"3_0_flush_rewrite_rules_2";s:4:"done";s:30:"divi_2_4_documentation_message";s:9:"triggered";s:15:"divi_1_3_images";s:7:"checked";s:9:"divi_logo";s:72:"www.mujeresdesolyagave.com.mxwp-content/uploads/2016/09/logotipo.png";s:12:"divi_favicon";s:0:"";s:14:"divi_fixed_nav";s:2:"on";s:26:"divi_gallery_layout_enable";s:5:"false";s:18:"divi_color_palette";s:63:"#000000|#ffffff|#e02b20|#e09900|#edf000|#7cda24|#0c71c3|#8300e9";s:15:"divi_grab_image";s:5:"false";s:15:"divi_blog_style";s:5:"false";s:22:"divi_shop_page_sidebar";s:16:"et_right_sidebar";s:22:"divi_mailchimp_api_key";s:0:"";s:31:"divi_regenerate_mailchimp_lists";s:5:"false";s:28:"divi_regenerate_aweber_lists";s:5:"false";s:23:"divi_show_facebook_icon";s:2:"on";s:22:"divi_show_twitter_icon";s:2:"on";s:21:"divi_show_google_icon";s:2:"on";s:18:"divi_show_rss_icon";s:2:"on";s:17:"divi_facebook_url";s:1:"#";s:16:"divi_twitter_url";s:1:"#";s:15:"divi_google_url";s:1:"#";s:12:"divi_rss_url";s:0:"";s:34:"divi_w