<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oscar Ricardo Sánchez Gutierréz on Medium]]></title>
        <description><![CDATA[Stories by Oscar Ricardo Sánchez Gutierréz on Medium]]></description>
        <link>https://medium.com/@oscarricardosan?source=rss-5e51bcffd6bd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OhvEUe5NXMSlWENTQ3cwzg.jpeg</url>
            <title>Stories by Oscar Ricardo Sánchez Gutierréz on Medium</title>
            <link>https://medium.com/@oscarricardosan?source=rss-5e51bcffd6bd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 02:41:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oscarricardosan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Basic Load Balancing for a Web System on DigitalOcean]]></title>
            <link>https://medium.com/@oscarricardosan/basic-load-balancing-for-a-web-system-on-digitalocean-744a7a735761?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/744a7a735761</guid>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 20:43:47 GMT</pubDate>
            <atom:updated>2026-04-01T18:07:24.471Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rkQcVyFeRgCcunw_.png" /></figure><p>In this article we’ll build a <strong>simple and inexpensive load-balanced web setup on DigitalOcean</strong>.</p><p>The architecture is intentionally minimal:</p><ul><li>1 DigitalOcean Load Balancer</li><li>2 small droplets</li><li>A lightweight web app running with <strong>Docker + PHP + Nginx</strong></li></ul><p>The goal is to show how quickly you can build a <strong>basic scalable web entry point</strong> without complex infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/0*qVTwa7Uhg6QSDQN-.gif" /><figcaption>Architecture diagram created with <a href="https://savnet.co/"><strong>savnet.co</strong></a></figcaption></figure><h3>Creating the first server</h3><p>Go to your <strong>DigitalOcean account</strong> and create a small droplet.</p><p>Configuration used in this guide:</p><ul><li>Image: <strong>Docker latest on Ubuntu 22.04</strong></li><li>Region: choose the closest to your users</li><li>Authentication: <strong>SSH recommended</strong> (Password also works)</li><li>Hostname: WebServer-1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*LjHJj-r1DtYwALbI.gif" /></figure><p>Once the droplet is ready, connect to the server.</p><h3>Preparing the server</h3><h3>1. Create a user</h3><pre>adduser web_app <br>usermod -aG sudo web_app <br>sudo usermod -aG docker web_app <br>su - web_app</pre><p>This user will run the application and manage Docker.</p><h3>2. Create the application folder</h3><pre>mkdir -p ~/app<br>cd ~/app</pre><h3>3. Create the application files</h3><p><strong>index.php:<br></strong>A very small script that prints the server IP responding to the request.</p><pre>&lt;?php<br>echo &#39;Hi. From ip &#39;.$_SERVER[&#39;SERVER_ADDR&#39;];</pre><p><strong>nginx.conf:<br></strong>Basic Nginx configuration to serve PHP via PHP-FPM.</p><pre>server {<br>    listen 80;<br>    server_name localhost;<br>    root /var/www/html;<br>    index index.php;<br><br>    location / {<br>        try_files $uri $uri/ =404;<br>    }<br><br>    location ~ \.php$ {<br>        fastcgi_pass 127.0.0.1:9000;<br>        fastcgi_index index.php;<br>        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>        include fastcgi_params;<br>    }<br>}</pre><p><strong>docker-compose.yml:<br></strong>This setup runs <strong>Nginx + PHP-FPM</strong> using Docker.</p><pre>version: &#39;3.8&#39;<br><br>services:<br>  nginx:<br>    image: nginx:alpine<br>    container_name: nginx-web<br>    network_mode: host<br>    volumes:<br>      - ./:/var/www/html<br>      - ./nginx.conf:/etc/nginx/conf.d/default.conf<br>    depends_on:<br>      - php-fpm<br><br>  php-fpm:<br>    image: php:8.2-fpm<br>    container_name: php-app<br>    network_mode: host<br>    volumes:<br>      - ./:/var/www/html</pre><h3>4. Start the application</h3><p>Run:</p><pre>docker compose up</pre><p>If everything is correct you should see the containers starting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*9NzaAFWmPJyrKE5h.png" /></figure><p>Open the <strong>server IP in your browser</strong>.</p><p>You should see something like `Hi. From ip 10.x.x.x:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/0*JSekrLQd05T1e73u.png" /></figure><h3>Creating the Load Balancer</h3><p>Now we create the <strong>DigitalOcean Load Balancer</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*5kv4WjAd0JqCmPnC.gif" /></figure><p>Configure:</p><ul><li>HTTP forwarding</li><li>Attach <strong>WebServer-1</strong></li></ul><p>Once created, open the <strong>load balancer IP</strong>.</p><p>You’ll see something similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/0*LoNjJcSIH9zEoiFy.png" /></figure><p>Notice that the response shows an <strong>internal server IP</strong>, because traffic between the load balancer and droplets happens inside DigitalOcean’s network.</p><h3>Creating the second server faster</h3><p>Instead of repeating the setup manually, we can <strong>create a snapshot</strong> of the first droplet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*TxXdqX3GD6uWvi0J.png" /></figure><p>Then create a <strong>new droplet from that snapshot</strong> in the same region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*jzBVDtO2gn1tN4T7.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*7BYDLNDygDRVjuTd.gif" /></figure><h3>Adding the new node to the Load Balancer</h3><p>Go back to the Load Balancer configuration and attach the second server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*otvVJPSAVkIZy1JO.png" /></figure><p>After about a minute, DigitalOcean will mark the droplet as <strong>healthy</strong>.</p><p>Now refresh the Load Balancer IP multiple times.</p><p>You should see responses coming from <strong>different internal IPs</strong>, meaning traffic is being distributed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*hCkIiT3doEmPZ9LM.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/0*Fo9UwflYVVyQ4Eem.png" /></figure><h3>Security recommendations</h3><p>This example focuses on the <strong>basic load balancing setup</strong>, but in a real environment you should also:</p><ul><li>Add a <strong>DigitalOcean firewall</strong></li><li>Restrict droplets so they are <strong>only reachable from the load balancer</strong></li><li>Enable <strong>HTTPS</strong></li><li>Configure <strong>health checks</strong></li></ul><p>These small changes significantly improve the security of the system.</p><h3>Tools used</h3><ul><li><strong>OBS</strong> — screen recording</li><li><strong>Kdenlive</strong> — video editing</li><li><a href="https://savnet.co/"><strong>savnet.co</strong></a> — architecture diagrams used in this article</li></ul><p><em>Originally published at </em><a href="https://dev.to/oscar_ricardosncheguti/basic-load-balancing-for-a-web-system-on-digitalocean-2hf7"><em>https://dev.to</em></a><em> on March 6, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=744a7a735761" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enviar SMS con AWS/Amazon con lambda]]></title>
            <link>https://medium.com/@oscarricardosan/enviar-sms-con-aws-amazon-con-lambda-756e5d61f732?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/756e5d61f732</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[sms]]></category>
            <category><![CDATA[aws-sns]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Mon, 02 Dec 2019 17:13:58 GMT</pubDate>
            <atom:updated>2019-12-02T17:13:58.614Z</atom:updated>
            <content:encoded><![CDATA[<p>En este tutorial verás como configurar tu entorno amazon para enviar SMS con una función Lambda de Amazon.</p><ol><li>Ir a la consola de pinpoint <a href="https://console.aws.amazon.com/pinpoint/home">https://console.aws.amazon.com/pinpoint/home</a></li><li>Selecciona una región disponible ya que no todas las regiones están habilitadas para envío de sms.</li><li>Crea un proyecto.</li><li>Selecciona configurar SMS:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YbbYzr4AlrP7tselIj9PmQ.png" /></figure><p>5. Configurar SMS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*H4qnmtbRnzNPLmlHL8_Scw.png" /></figure><p>6. Para probar el servicio de forma manual ingresa los siguientes valores:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8j2jt2cEL0zp80VWpnbF3Q.png" /><figcaption>El número celular debe empezar con el código de país (Colombia =&gt; +57)</figcaption></figure><p>7. Selecciona tipo de mensaje e ingresa el mensaje a enviar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-lvNkIH4UZ5oG-aLdCyVA.png" /></figure><p>Ahora debemos configurar nuestra función Lambda</p><ol><li>Importante debemos escoger la misma zona horaria del servicio que creamos anteriormente:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*CJUxikXnGDpk_rpvI28coA.png" /></figure><p>3. Creamos nuestra función con la configuración por defecto:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z0napSE7QC-wRXZREj7ltA.png" /></figure><p>4. El código de nuestra función debe ser así:</p><pre>let AWS = require(&#39;aws-sdk&#39;);<br>const sns = new AWS.SNS();<br>exports.handler = function (event, context, callback) {</pre><pre>let receiver = event[&#39;receiver&#39;];<br>    let sender = event[&#39;sender&#39;];<br>    let message = event[&#39;message&#39;];</pre><pre>let isPromotional = true;</pre><pre>console.log(&quot;Sending message&quot;, message, &quot;to receiver&quot;, receiver);</pre><pre>sns.publish({<br>        Message: message,<br>        MessageAttributes: {<br>            &#39;AWS.SNS.SMS.SMSType&#39;: {<br>                DataType: &#39;String&#39;,<br>                StringValue: &#39;Promotional&#39;<br>            },<br>            &#39;AWS.SNS.SMS.SenderID&#39;: {<br>                DataType: &#39;String&#39;,<br>                StringValue: sender<br>            },<br>        },<br>        PhoneNumber: receiver<br>    }).promise()<br>        .then(data =&gt; {<br>            console.log(&quot;Sent message to&quot;, receiver);<br>            callback(null, data);<br>        })<br>        .catch(err =&gt; {<br>            console.log(&quot;Sending failed&quot;, err);<br>            callback(err);<br>        });<br>}</pre><p>5. Damos click en Probar y configuramos nuestra prueba así:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*um_FFctEa1RxJ_x0iE0OnQ.png" /></figure><p>6. Lo más probable es que bote un error de permisos:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*EzvbLcUAXhl1897TvM-3Eg.png" /></figure><p>7. Para solucionarlo vamos a la parte inferior en el tab permisos y damos click en consultar Rol…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*IAxav9r9VrsNxxhACLr7lQ.png" /></figure><p>8. En la página para permisos debemos agregar dos nuevas políticas:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pX0icNIgG48iz7lax40eqQ.png" /></figure><p>La primera para SMS &amp; Voice ,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iLPfZujbWSp9s9Zp4V-Cg.png" /><figcaption>Click en revisar política en la siguiente pag le asignas un nombre y crear.</figcaption></figure><p>La segunda para SNS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4kw-cU9wa_HWbVTilKmlSg.png" /><figcaption>Click en revisar política en la siguiente pag le asignas un nombre y crear.</figcaption></figure><p>Con ello ya obtendrás una respuesta exitosa:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*xuNl5nJyNLbt_ug5gMND3A.png" /></figure><p>Si deseas exponer la función vía post mira este tutorial</p><p><a href="https://medium.com/@oscarricardosan/aws-crear-funci%C3%B3n-lambda-consumiendo-api-post-y-exponiendola-como-api-v%C3%ADa-post-con-apigateway-368f99a5ee0c?source=your_stories_page---------------------------">https://medium.com/@oscarricardosan/aws-crear-funci%C3%B3n-lambda-consumiendo-api-post-y-exponiendola-como-api-v%C3%ADa-post-con-apigateway-368f99a5ee0c</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=756e5d61f732" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS — Crear Función Lambda, consumiendo Api POST y exponiendola como API vía Post con ApiGateway]]></title>
            <link>https://medium.com/@oscarricardosan/aws-crear-funci%C3%B3n-lambda-consumiendo-api-post-y-exponiendola-como-api-v%C3%ADa-post-con-apigateway-368f99a5ee0c?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/368f99a5ee0c</guid>
            <category><![CDATA[aws-lambdaaws]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Tue, 19 Nov 2019 16:03:13 GMT</pubDate>
            <atom:updated>2019-11-19T16:03:13.662Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS — Crear Función Lambda, consumiendo Api POST y exponiendola como API vía Post con ApiGateway</h3><p>Este es un rápido tutorial de como crear una función lamba con una puerta de entrada vía http Post.</p><ol><li>Crearemos una función desde <a href="https://us-east-2.console.aws.amazon.com/lambda/home">https://console.aws.amazon.com/lambda/home</a></li><li>Creamos nuestra función de test:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p8DZFR4hwrSR2287BJaovg.png" /></figure><p>3. Este será el código de nuestra función</p><pre>var got = require(&#39;got&#39;);</pre><pre>exports.handler = async function(event, context, callback) {</pre><pre>//await hace que espere a que la función se ejecute<br>await got.post(&#39;<a href="https://jsonplaceholder.typicode.com/posts&#39;">https://jsonplaceholder.typicode.com/posts&#39;</a>,  <br>        { <br>            body: JSON.stringify({&quot;message&quot;:&quot;Mi mensage xx&quot;}), <br>            headers: {&#39;accept&#39;: &#39;application/json&#39;,&#39;Content-Type&#39;: &#39;application/json&#39;<br>            }<br>        },{json: true})<br>    .then(function(response) {<br>        <br>        var responseApi= JSON.parse(response.body);<br>        callback(null, {<br>            headers: {&quot;content-type&quot;: &quot;application/json&quot;},<br>            statusCode: 200,<br>            body: JSON.stringify(responseApi),<br>        });</pre><pre>})<br>    .catch(function(error) {<br>        callback(JSON.stringify(error));<br>    });<br>};</pre><blockquote>Ten en cuenta que para usar got tuviste que haber instalado dee forma local con npm el paquete <strong>npm i got</strong>, comprimir index.js, composer.json, y la carpeta node_modules para subirlo a la lambda.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*duhjTfZwWb7l5OfhV5UC1w.png" /><figcaption>Archivos en equipo local que debes comprimir para subir</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9vPcR-AvKO99IoOiLa2xQ.png" /><figcaption>Para esto debes subir el zip con los archivos y click en Guardar, parte supeior derecha.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XAeib62YgYsQ2WXL7Qhjg.png" /><figcaption>Con lo anterior tu función ya debió quedar con los respectivos paquetes instalados y el código.</figcaption></figure><p>Ahora probaremos que funcione en nuestra consola, dando click en el botón Probar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*4IUA1TlQrE7ck2ZByGFA4Q.png" /></figure><p>La primera vez tendremos que configurar nuestro evento:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*LhQddPZicWD6VNO2oik6QA.png" /></figure><p>Luego de ello nuevamente click en <strong>Probar</strong>, podremos ver el resultado en consola:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*OZBAiCLt3_3ELaj3NN36cA.png" /></figure><p>Ahora que ya tenemos una función funcionando solo debemos crear la puerta de entrada con ApigGateway.</p><ol><li>Vamos a <a href="https://console.aws.amazon.com/apigateway/home">https://console.aws.amazon.com/apigateway/home</a>.</li><li>Crear API.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whBaVV_sHcSRqVm8BVaZ2w.png" /></figure><p>3. Creamos un recurso:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*wFthtE84NNLdfpw6Zhp4dA.png" /></figure><p>4. Seleccionamos el recurso test, y creamos un método:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*weC3VMK1YUVyWwkRERT3Fg.png" /><figcaption>Nos aparecerá un select en el que debemos seleccionar post y luego click en un check que aparece al lado.</figcaption></figure><p>5. Configuramos nuestro método:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*XupDj5DkcXoBqE058Y1prA.png" /></figure><p>6. Implementamos API:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*W_lZYUs1ytJXBBIQSH60jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*9edeOFEJpHq11SWLwEcF-Q.png" /></figure><p>Con lo anterior volvemos a nuestra función y veremos que en el diseño ya esta asociada al ApiGateway:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WW_OkHK42w_xFTqqV0TF9A.png" /></figure><p>Ejecutamos la url <a href="https://thcso19wre.execute-api.us-east-2.amazonaws.com/Test/test"><strong>https://thcso19wre.execute-api.us-east-2.amazonaws.com/Test/test</strong></a> y veremos la misma respuesta que en la consola.</p><p>Ten en cuenta que en la URL el primer <strong>Test</strong> es el nombre de nuestra etapa y el segundo <strong>test</strong> es el de nuestro recurso, puedes cambiarlos para hacerlo mucho más amigable.</p><p>En Postman la respuesta sería así:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*IHjyuW_-buF0wOMZEv1Hvw.png" /></figure><p>Links de interes:</p><p><a href="https://aws.amazon.com/es/premiumsupport/knowledge-center/api-gateway-cloudwatch-logs/">https://aws.amazon.com/es/premiumsupport/knowledge-center/api-gateway-cloudwatch-logs/</a><br><a href="https://docs.aws.amazon.com/es_es/lambda/latest/dg/nodejs-prog-model-handler.html">https://docs.aws.amazon.com/es_es/lambda/latest/dg/nodejs-prog-model-handler.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=368f99a5ee0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inyectar JS en sitio web externo]]></title>
            <link>https://medium.com/@oscarricardosan/inyectar-js-en-sitio-web-externo-afe3d0805841?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/afe3d0805841</guid>
            <category><![CDATA[spanish]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[botjs]]></category>
            <category><![CDATA[inject-js]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Mon, 12 Aug 2019 15:10:14 GMT</pubDate>
            <atom:updated>2019-08-12T15:10:14.496Z</atom:updated>
            <content:encoded><![CDATA[<p>Inyecta tu propio código js a sitio web externo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*gkLEQNYmD0XoRYqc" /></figure><p>Lo primero que debes hacer es añadir la extensión <strong>CSS and Javascript Injection</strong> en Google Chrome.</p><p><a href="https://chrome.google.com/webstore/detail/css-and-javascript-inject/ckddknfdmcemedlmmebildepcmneakaa">CSS and Javascript Injection</a></p><p>Luego de ello ya tendremos en la parte superior derecha el icono dela extensión y al dar click en el te mostrara una ventana negra en la que puedes agrega css y/o tu js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*VzBB-Y1T_0p_7vRhIs5BDw.png" /></figure><p>El código que agregues se ejecutara automáticamente cada que cargues la página si deseas cargar código externo lo puedes hacer en el bloque Javascript así:</p><pre>var loadScriptAsync = function(uri){<br>  return new Promise((resolve, reject) =&gt; {<br>    var tag = document.createElement(&#39;script&#39;);<br>    tag.src = uri;<br>    tag.async = true;<br>    tag.onload = () =&gt; {<br>      resolve();<br>    };<br>    var firstScriptTag = document.getElementsByTagName(&#39;script&#39;)[0];<br>    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);<br> });<br>}<br>var scriptLoaded = loadScriptAsync(&#39;<a href="https://sistema-in/">https://m</a>i_js.js&#39;);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afe3d0805841" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Montar servidor ftp en Linux]]></title>
            <link>https://medium.com/@oscarricardosan/montar-servidor-ftp-en-linux-37accc96571f?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/37accc96571f</guid>
            <category><![CDATA[ftp-linux]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Fri, 03 May 2019 21:32:44 GMT</pubDate>
            <atom:updated>2020-06-07T21:34:49.016Z</atom:updated>
            <content:encoded><![CDATA[<h3>Montar servidor FTP en Linux</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6Azw3_CIAFllmt_H.jpg" /></figure><p>Para esto usaremos VSFTPD, de “Very Secure File Transfer Protocol Daemon”, es un servidor FTP de código abierto, ligero, estable, más seguro y más rápido para sistemas operativos Unix y Linux. Algunos sitios FTP populares para Debian, FreeBSD, RED HAT, SUSE, Kernel, KDE, GENOME, etc., funcionan con VSFTPD. Es el servidor FTP predeterminado para la mayoría de los sistemas operativos Linux y Unix, como Red Hat, CentOS, Fedora y Ubuntu. Es compatible con IPv6, y SSL. Por lo tanto, puede configurar un servidor FTP seguro para su organización utilizando VSFTPD. Está licenciado bajo GPL, y es completamente gratuito.</p><p><strong>Instalación de vsftpd</strong></p><pre>sudo apt-get install vsftpd</pre><p><strong>Configuración:</strong></p><pre>sudo nano /etc/vsftpd.conf</pre><p>Cambia las siguientes líneas:</p><pre>...</pre><pre>#Permite escritura en el directorio<br>allow_writeable_chroot=YES<br>write_enable=YES</pre><pre>##Desactivar login de usuario anonimo<br>anonymous_enable=NO</pre><pre>##Descomenta estas dos líneas para permitir ascii<br>ascii_upload_enable=YES<br>ascii_download_enable=YES</pre><pre>##Opcional, Especifica mensaje de bienvenida<br>ftpd_banner=Bienvenido a Servicio FTP de OSTechNix.</pre><pre>##Descomenta esta línea para usar el timezone local<br>use_localtime=YES</pre><pre>##Al ingresar el usuario ingrese a su propio directorio no tenga acceso a otros archivos en el sistema</pre><pre>chroot_local_user=YES<br>local_root=/ftphome/$USER<br>user_sub_token=$USER</pre><pre>pasv_min_port=40000<br>pasv_max_port=50000</pre><pre># Dado que solo estamos planeando permitir el acceso a FTP caso por caso, configuraremos la <br># configuración para que el usuario solo tenga acceso cuando se agrega explícitamente a una <br># lista en lugar de hacerlo de manera predeterminada:<br># echo &quot;sammy&quot; | sudo tee -a /etc/vsftpd.userlist</pre><pre>userlist_enable=YES<br>userlist_file=/etc/vsftpd.userlist<br>userlist_deny=NO</pre><pre># Default umask for local users is 077. You may wish to change this to 022,<br># if your users expect that (022 is used by most other ftpd&#39;s)<br># Especifica los permisos con los que se crean nuevos archivos <a href="https://serverfault.com/questions/201305/default-owner-permissions-of-created-files-via-vsftpd">https://serverfault.com/questions/201305/default-owner-permissions-of-created-files-via-vsftpd</a><br>#si no lo especificas los archivos se cren como solo lectura y luego para moverlos es un dolor de cabeza.<br>local_umask=002</pre><p>Guarda los cambios de la configuración. Reinicia el servicio del FTP con</p><pre>sudo service vsftpd restart</pre><p>Para verificar que este corriendo ejecutamos el comando</p><pre>sudo systemctl status vsftpd</pre><p>que deberá mostrarnos:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*qR9-ps5B1tnNYJbhBygDDg.png" /></figure><h3><strong>Creación de usuario FTP</strong></h3><p>Por seguridad no deberíamos permitir a un usuario root acceder al FTP. Por ello crearemos un nuevo usuario que no sea root.</p><pre>sudo adduser usuario_ftp</pre><p>Luego deberás ingresar el resto de información del usuario como clave, nombre y demás. Puedes crear todos los usuarios que quieras.</p><p>Ahora debemos crear el directorio al que serán enviados nuestros usuarios al ingresar al FTP, debe existir unacarpeta por cada usuario</p><pre><strong>#Creamos directorio donde va el directorio para nuestro FTP</strong><br>mkdir -p /ftphome/usuario_ftp<br>sudo chown usuario_ftp:usuario_ftp /ftphome/usuario_ftp<br><strong>#Permisos para write, read, execute a usuario y grupo y ninguno para otros </strong><a href="https://www.computerhope.com/unix/uchmod.htm"><strong>https://www.computerhope.com/unix/uchmod.htm</strong></a><br>sudo chmod 774 /ftphome/usuario_ftp</pre><pre><strong>#Modificamos el home del usuario</strong><br>sudo usermod -d /ftphome/usuario_ftp/ -m usuario_ftp</pre><pre><strong>#Verificamos que el home del usuario este bien definido.</strong><br>getent passwd usuario_ftp</pre><pre><strong>#Permitimos acceso al FTP</strong><br>echo &quot;usuario_ftp&quot; | sudo tee -a /etc/vsftpd.userlist</pre><p>Reinicia el servicio del FTP con</p><pre>sudo service vsftpd restart</pre><p>Tendremos que abrir los puertos 20 y 21 para FTP, el puerto 990 para más adelante cuando activemos TLS y los puertos 40000–50000 para el rango de puertos pasivos que planeamos configurar en el archivo de configuración:</p><pre>sudo ufw status</pre><pre>#Permitir conexiones FTP:<br>sudo ufw allow ftp<br>sudo ufw allow 20/tcp<br>sudo ufw allow 21/tcp<br>sudo ufw allow 990/tcp<br>sudo ufw allow 40000:50000/tcp</pre><p><strong>Aseguramos FTP</strong></p><p>Ejecutamos</p><pre>sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem</pre><pre><strong>#Se completan los datos</strong></pre><pre>sudo nano /etc/vsftpd.conf</pre><pre><strong>#Agregamos:</strong></pre><pre>rsa_cert_file=/etc/ssl/private/vsftpd.pem<br>rsa_private_key_file=/etc/ssl/private/vsftpd.pem<br>ssl_enable=YES</pre><pre><strong># agregue las siguientes líneas para denegar explícitamente las conexiones anónimas a través <br># de SSL y para requerir SSL tanto para la transferencia de datos como para los inicios de sesión:<br></strong>allow_anon_ssl=NO<br>force_local_data_ssl=YES<br>force_local_logins_ssl=YES</pre><pre><strong>#configure el servidor para usar TLS, el sucesor preferido de SSL, agregando las siguientes líneas:</strong><br>ssl_tlsv1=YES<br>ssl_sslv2=NO<br>ssl_sslv3=NO</pre><pre><strong>#Primero, no requeriremos la reutilización <br># de SSL porque puede romper muchos clientes FTP. Requeriremos conjuntos de cifrado de cifrado &quot;alto&quot;, qu$<br># clave iguales o mayores a 128 bits:</strong><br>require_ssl_reuse=NO<br>ssl_ciphers=HIGH</pre><pre><strong><br>sudo systemctl restart vsftpd</strong></pre><p>Puedes ingresar a tu ftp desde tu navegador web o explorador con <br><strong>ftp://ftp-server-ip/ </strong>esto te pedirá usuario y contraseña, o puedes ingresar directamente así: ftp://ftp_user:password@FTP-Server-IP-Address</p><p>Agradecimientos a:</p><p><a href="https://www.ostechnix.com/install-vsftpd-server-ubuntu-16-04-lts/">Install VSFTPD server in Ubuntu 16.04 LTS - OSTechNix</a></p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-16-04">https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-16-04</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37accc96571f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Links de interes para crear bot en Zoho cliq]]></title>
            <link>https://medium.com/@oscarricardosan/links-de-interes-para-crear-bot-en-zoho-cliq-1f4a55ecb9f1?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f4a55ecb9f1</guid>
            <category><![CDATA[zoho-cliq]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Thu, 14 Mar 2019 20:40:57 GMT</pubDate>
            <atom:updated>2019-03-14T21:54:41.185Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.zoho.com/cliq/help/restapi/v2/#plain_text">T</a>ipo de respuestas para objeto response:</p><p><a href="https://www.zoho.com/cliq/help/restapi/v2/#plain_text">Rest API documentation | Cliq</a></p><p>Errores comunes al crear bot</p><p><a href="https://www.zoho.com/deluge/help/error-messages.html">Error Messages | Help - Zoho Deluge</a></p><p>Información de funciones para bot</p><p><a href="https://www.zoho.com/cliq/help/platform/cliq-objects.html">Deluge Object References | Cliq</a></p><p>Botones instantaneos</p><p><a href="https://www.zoho.com/cliq/help/restapi/v2/#instant_buttons">Rest API documentation | Cliq</a></p><p>Manejar contexto para realizar preguntas</p><p><a href="https://www.zoho.com/cliq/help/platform/bot-contexthandler.html">Bot Context Handler | Cliq</a></p><p>Publicar lista de tareas pendientes</p><p><a href="https://www.zoho.com/cliq/help/platform/configuring-schedulers.html">Configuring Schedulers | Cliq</a></p><p>Como controlar las respuestas de contexto / controladores de contexto:</p><ol><li>Desde el controlador de mensajes hacemos invocación del contex:</li></ol><pre>if(message.containsIgnoreCase(&quot;ROOM SERVICE&quot;))<br>{<br> context = {&quot;id&quot;:&quot;<strong>Room Service</strong>&quot;,&quot;timeout&quot;:&quot;300&quot;,&quot;params&quot;:{{&quot;name&quot;:&quot;room service&quot;,&quot;question&quot;:&quot;Great! Here is a list of options for you to choose from.&quot;,&quot;suggestions&quot;:{&quot;list&quot;:{{&quot;text&quot;:&quot;House Keeping&quot;},{&quot;text&quot;:&quot;Maintenance&quot;}}}},{&quot;name&quot;:&quot;time&quot;,&quot;question&quot;:&quot;Okay cool. When can I send them over?&quot;,&quot;suggestions&quot;:{&quot;list&quot;:{{&quot;text&quot;:&quot;Now&quot;},{&quot;text&quot;:&quot;In half hour&quot;}}}},{&quot;name&quot;:&quot;<strong>confirmation</strong>&quot;,&quot;question&quot;:&quot;Please confirm your request once!&quot;,&quot;suggestions&quot;:{&quot;list&quot;:{{&quot;text&quot;:&quot;Yes&quot;},{&quot;text&quot;:&quot;No&quot;}}}}}};<br> response.put(&quot;context&quot;,context);<br>}<br>return response;</pre><p>Ahora vamos al controlador de contesxto:</p><pre>response = Map();<br>info answers;<br>if(context_id.matches(&quot;<strong>Room Service</strong>&quot;))<br>{<br> confirm = &quot;Please check our other options then!&quot;;<br> if(answers.get(&quot;<strong>confirmation</strong>&quot;).get(&quot;text&quot;).containsIgnoreCase(&quot;YES&quot;))<br> {<br>  confirm = &quot;Great! I&#39;ve arranged for the &quot; + answers.get(&quot;room service&quot;).get(&quot;text&quot;) + &quot; to be there &quot; + answers.get(&quot;time&quot;).get(&quot;text&quot;) + &quot;. :thumbsup:&quot;;<br> }<br> response.put(&quot;text&quot;,confirm);<br>}<br>return response;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f4a55ecb9f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crear ChatBot Facebook - Laravel]]></title>
            <link>https://medium.com/@oscarricardosan/crear-chatbot-facebook-laravel-fe1e09c67b8c?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe1e09c67b8c</guid>
            <category><![CDATA[messenger-bots]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[messenger]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Fri, 20 Apr 2018 05:35:33 GMT</pubDate>
            <atom:updated>2018-04-20T05:36:07.872Z</atom:updated>
            <content:encoded><![CDATA[<h3>Facebook</h3><ol><li>Debes crear una página en facebook, que es donde ira el chat: <a href="https://www.facebook.com/pages/create">https://www.facebook.com/pages/create</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*RFwW8yAiqhsZRYrGGT0-sQ.png" /></figure><p>2. Debes crear una facebook app <a href="https://developers.facebook.com/apps/">https://developers.facebook.com/apps/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*v-1iXvJnQBj3GfwZmEzLvA.png" /></figure><p>3. Eliges un nombre para tu app y luego ingresas el código de seguridad que te aparece.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*sYyfYxdGfvxZYebXSumViw.png" /></figure><p>4. En tipo producto seleccionas Messenger.</p><p>En este link encuentras más documentación <a href="https://developers.facebook.com/docs/messenger-platform/">https://developers.facebook.com/docs/messenger-platform/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*zfhvozvj64r6D1mAfuFnOQ.png" /></figure><p>5. Ubicate en el bloque generación de token y selecciona tu página de Facebook. Autoriza a la app y así tendras tu token.</p><h3>Laravel — Botman Studio</h3><p>Por facilidad usaremos BotmanStudio que ya viene listo para ser usado, sin embargo, podrías instalar el paquete en un proyecto aparte <a href="https://botman.io/2.0/botman-studio#installation">https://botman.io/2.0/botman-studio#installation</a></p><ol><li>Ejecuta</li></ol><pre>composer create-project --prefer-dist botman/studio mi_primer_chatbot</pre><p><a href="https://botman.io/2.0/driver-facebook-messenger">BotMan - Facebook Messenger</a></p><p>2. Ahora instalaremos el driver para facebook, ubicate dentro del proyecto y ejecuta</p><pre>php artisan botman:install-driver facebook</pre><p>3. En el .env de tu proyecto agrega las variables:</p><pre>FACEBOOK_TOKEN=your-facebook-page-token<br>FACEBOOK_VERIFICATION=your-facebook-verification-token<br>FACEBOOK_APP_SECRET=your-facebook-app-secret</pre><p>FACEBOOK_TOKEN: Es el token que generamos en la primer parte para nuestra app.</p><p>FACEBOOK_VERIFICATION: Código que tu eliges</p><p>FACEBOOK_APP_SECRET: Lo obtienes en configuración/basica, clave secreta</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfBacm7HAfv-HYf_ln5Alw.png" /></figure><pre><strong>IMPORTANTE: </strong>Para continuar debemos tener nuestro proyecto Laravel publicado en una url HTTPS.<br>Si no quieres publicarlo puedes usar:</pre><pre><strong>php artisan serve</strong></pre><pre>Luego instala ngrok. <br><strong>ngrok http 80</strong></pre><p><strong>Facebook</strong></p><p>Debemos volver a la página de messenger para crear un webhook</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXlpZfkdE0nrJ2Q_01LdHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*zuO3QOx9RWcW5tcSGih7vQ.png" /></figure><p>Si te quedo bien deberás ver algo parecido :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*ETM1rVSeug1cpLJbPM2mcA.png" /></figure><p>Ahora debemos asociar la app a nuestra página web:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*ESXt6KjC1phCAlf3F2Kn-g.png" /></figure><p>Ahora si entro a la página de SAVNE:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*aC46FS6HHA9g9P39fFKVAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*vNtB96PHa3pm9KB16pHDlA.png" /><figcaption>./routes/botman.php</figcaption></figure><p>Ya solo te queda probar a armar tus conversaciones</p><p>Agradecimientos a:</p><p><a href="https://medium.com/skyshidigital/create-simple-chatbots-with-laravel-and-botman-under-5-minutes-ee37e617d03e">Create simple chatbots with Laravel and BotMan under 5 minutes</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fll-QC9h9KxE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dll-QC9h9KxE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fll-QC9h9KxE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a341eed09db7800d8477f7d183c64f13/href">https://medium.com/media/a341eed09db7800d8477f7d183c64f13/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe1e09c67b8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instalar octobercms en Homestead-Laravel]]></title>
            <link>https://medium.com/@oscarricardosan/instalar-octobercms-en-homestead-laravel-bae26809cd78?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/bae26809cd78</guid>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 15:09:55 GMT</pubDate>
            <atom:updated>2018-04-10T16:12:40.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*cv3sYZUe-j9zMDbVG1O2Vw.png" /></figure><ol><li>Ve a la página de octobercms <a href="http://octobercms.com/docs/setup/installation">http://octobercms.com/docs/setup/installation</a> y descarga el instalador.</li></ol><p>2. Cuando tengas el .zip descomprime la carpeta y pega el contenido en tu carpeta de código compartido, donde quieres levantar el cms</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*kJu1Y_8EFe1PKf9yTPHrIA.png" /></figure><p>3. Ahora debes configurar Homestead.yaml para que cree el acceso, normalmente lo apuntamos a la carpeta public pero como el instalador no es un proyecto de laravel solo pondremos:</p><blockquote>- map: october_cms.app<br> to: /home/vagrant/Code/tests/october_cms</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*FJwiYv6r-RbdNy1r5Q2N3A.png" /></figure><p>4. Ahora debemos modificar hosts para agregar al final el nuevo acceso</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*lEu68s2XFwgWIUGwzxr4KA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*LIfbDbK3xwA0hrWZCFLLRQ.png" /></figure><p>5. Ejecutamos vagrant provision para que tome los cambios</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*yzil3BflNJphuFTthCjYjA.png" /></figure><p>6. Ahora podemos entrar por el navegador <a href="http://october_cms.app/install.php">http://october_cms.app/install.php</a> para iniciar nuestra instalación:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V48n1PEKnmpFw-zINgAlXw.png" /><figcaption>Acá nos dirá si cumplimos con todos los pasos</figcaption></figure><p>7. Vamos al final y click en “Acepto &amp; Continuar”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*_EhThH5S7KeCFjWl0qamag.png" /></figure><p>8. Siguientes pasos configuramos la conexión a BD y usuario admin, no entrare en detalle en esta parte. Cuando hayas ingresado la información click en la parte inferior de la página click en Continue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*D09ZI54A_PKXP6-13ucRGA.png" /></figure><p>9. Tenemos tres opciones, empezar un proyecto en blanco, usar un tema o cargar los archivos.</p><p>10. Cuando allá terminado no olvides eliminar install.php y la carpeta install_files.</p><p>El usuario para ingresar al backend es solo admin, no el correo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bae26809cd78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Correr emulador en phonegap]]></title>
            <link>https://medium.com/@oscarricardosan/correr-emulador-en-phonegap-bb07ffa947da?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb07ffa947da</guid>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Sat, 28 Oct 2017 12:00:33 GMT</pubDate>
            <atom:updated>2018-10-16T19:29:10.075Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Descargar Android Studio <a href="https://developer.android.com/studio/index.html">https://developer.android.com/studio/index.html</a></li><li>Ir a donde lo descargaste (/home/user/bin/android-studio/bin) y ejecutar studio.sh</li><li>Abrirá Android Studio y te preguntara para descargar el sdk dale siguiente y descargara el SDK en /Android/</li><li>Actualizar la variable Android_home <a href="https://stackoverflow.com/questions/36198165/failed-to-find-android-home-environment-variable">https://stackoverflow.com/questions/36198165/failed-to-find-android-home-environment-variable</a></li><li>Instalar JAVA <a href="https://evothings.com/doc/build/cordova-install-linux.html">https://evothings.com/doc/build/cordova-install-linux.html</a></li></ol><p>Para error</p><blockquote>Cannot replace undefined</blockquote><p><a href="https://stackoverflow.com/questions/44687476/cordova-android-emulator-cannot-read-property-replace-of-undefined">Cordova android emulator &quot;cannot read property &#39;replace&#39; of undefined&quot;</a></p><blockquote>ANDROID_SD_ROOT Not defined</blockquote><pre>export ANDROID_SDK_ROOT=&#39;/Users/username/Library/Android/sdk&#39;</pre><blockquote>sh: 1: glxinfo: not found<br>[140170726504256]:ERROR:./android/opengl/EmuglBackendScanner.cpp:37:Invalid executable directory: ../emulator</blockquote><p><strong>~/Android/Sdk/tools/emulator -avd Nexus_5X_API_27_x86</strong></p><blockquote>libGL error: unable to load driver: r600_dri.so <br>libGL error: driver pointer missing</blockquote><p><a href="https://stackoverflow.com/questions/35911302/cannot-launch-emulator-on-linux-ubuntu-15-10"><strong>https://stackoverflow.com/questions/35911302/cannot-launch-emulator-on-linux-ubuntu-15-10</strong></a></p><h3>PARA EJECUTAR</h3><p>En una terminal corres el emulador</p><p>Desde /Android/Sdk/tools$</p><blockquote>export ANDROID_HOME=~/Android/Sdk/<br>LD_PRELOAD=’/usr/lib/x86_64-linux-gnu/libstdc++.so.6&#39; emulator -avd Nexus_5X_API_27_x86</blockquote><blockquote>LD_PRELOAD=”/usr/lib/x86_64-linux-gnu/libstdc++.so.6&quot; ./emulator -avd android_5_1</blockquote><p>En otra pestaña desde tu app :</p><blockquote>cordova emulate android</blockquote><p>Inspeccionar errores de aplicación desde Chrome</p><blockquote>chrome://inspect</blockquote><h3>INSTALAR CORDOVA</h3><h3>Install Cordova<br>Follow these steps to install Cordova:</h3><p>Install Node.js. Node.js may already be installed. To test the installation, open a terminal window and type:</p><p>nodejs — version<br>If the version number is displayed, Node.js is installed.</p><p>If Node.js is not installed, install with:</p><p>sudo apt-get install nodejs<br>Also add the alias “node” for nodejs, as this is needed by Cordova:</p><p>sudo ln -s /usr/bin/nodejs /usr/bin/node<br>Install Node Package Manager (npm). Test if npm is installed by typing:</p><p>npm — version<br>If npm is not installed, install with:</p><p>sudo apt-get install npm<br>Install Git. Git is a version control system, which is used by Cordova behind-the-scenes. Test if Git is installed by typing:</p><p>git — version<br>If Git is not installed, install with:</p><p>sudo apt-get install git<br>Install Cordova. Cordova is installed using the Node Package Manager (npm). Type the following to install:</p><p>sudo npm install -g cordova<br>Test the Cordova install by typing:</p><p>cordova — version<br>If you see the version number, you have successfully installed Apache Cordova!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb07ffa947da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Paquetes para PHONEGAP]]></title>
            <link>https://medium.com/@oscarricardosan/phonegap-5a19c7bac5c8?source=rss-5e51bcffd6bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a19c7bac5c8</guid>
            <category><![CDATA[cordova]]></category>
            <dc:creator><![CDATA[Oscar Ricardo Sánchez Gutierréz]]></dc:creator>
            <pubDate>Tue, 10 Oct 2017 05:52:39 GMT</pubDate>
            <atom:updated>2019-11-22T15:16:47.835Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Plugins</blockquote><p><a href="http://docs.phonegap.com/plugin-apis/">Plugin APIs | PhoneGap Docs</a></p><blockquote>Correr aplicaciones en fondo</blockquote><p><a href="https://github.com/katzer/cordova-plugin-background-mode">katzer/cordova-plugin-background-mode</a></p><blockquote>GPS</blockquote><p><a href="https://www.npmjs.com/package/cordova-background-geolocation-lt">cordova-background-geolocation-lt</a></p><blockquote>Ejecutar app en el boot de android</blockquote><p><a href="https://github.com/ToniKorin/cordova-plugin-autostart">ToniKorin/cordova-plugin-autostart</a></p><blockquote>Geolocation</blockquote><p><a href="https://www.npmjs.com/package/cordova-background-geolocation-lt">cordova-background-geolocation-lt</a></p><blockquote>Código de barras</blockquote><p><a href="https://github.com/giorgiofellipe/cordova-plugin-datecs-printer">giorgiofellipe/cordova-plugin-datecs-printer</a></p><blockquote>Código de barras</blockquote><p><a href="https://github.com/nuCashDev/cordova-plugin-cszbar">nuCashDev/cordova-plugin-cszbar</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a19c7bac5c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>