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
@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:
roxana@mujeresdesolyagave.com.mx ";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
@netoxico
netoxico / xml2json.py
Created February 4, 2016 00:23
xml2json.py
#!/usr/bin/env python
# coding: utf-8
import xmltodict
from xmltodict import unparse
XML = """
<SOAP-ENV:Envelope xmlns:tns="http://MMIT.Gateway.WebServices" xmlns:ns0="http://schemas.multi-mit.com/DataFormat" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://MMIT.Gateway.WebServices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
@netoxico
netoxico / sudoku_seeds.txt
Created December 6, 2015 22:27 — forked from ndrwhr/sudoku_seeds.txt
10,000, certified organic, sudoku seed puzzles. Made in Brooklyn, NY.
381562479527491638964873521293154867718326954645987312872645193436719285159238746
157864392942573816863912754429751683716328945385649127571496238234187569698235471
219764385347958621865132974436285197921473568578619432694527813182346759753891246
342587619985461237176293485268945371531876942497132568719324856853619724624758193
173854629682179534954263781315928476298746315746531892531697248469382157827415963
481596237523748169697231854735189642862475913914362785356827491179654328248913576
754689123162453798398127465413896257527314689689275314231548976876932541945761832
356197842184625937792834516678243159925781364413569278867312495539478621241956783
815764923732519846649823751276485139453971268981236574524698317368157492197342685
472953861159486732836271495917865324648132579523749186391527648785694213264318957