Entradas

Load SASS and Bulma to your Vue JS project

Imagen
Introduction According to docs Bulma is highly customizable thanks to 419 Sass variables living across 28 files. These variables exist at 4 levels: initial variables: global variables with literal values derived variables: global variables with values that reference other variables, or are computed generic variables: for the HTML elements which carry no CSS class element/component variables: variables that are specific to a Bulma element/component In this case we are gonna add SCSS files to our existing project made with the webpack template via vue-cli, so maybe if you create your project in different way this may not work. Strategy To customize Bulma, you will need to: vue create my-awesome-project npm install bulma After that let's install the SASS dependencies: npm install --save-dev node-sass sass-loader If you have a vue.config.js you will add a few lines, otherwise you need to create this file in the root of you

Why does this Nginx config result in “rewrite or internal redirection cycle”

Imagen
API REST: Flask APP: Vue Js made with vue-cli NGINX as web server Fast note of what happened with the error  “rewrite or internal redirection cycle”. I have to say that I've been dealing with this for hours. THE STORY My vue-router export const router = new Router({ base: '/myapp/', mode: 'history', routes: [   { path: '/', name: 'home', component: Login   },   { path: '/login', name: 'login', component: Login   },   { path: '/foo', name: 'foo', component: Foo   },   { path: '*', component: NotFound   }, ]   }); So I built my app with the command npm run build  Then i copy and paste the files of dist in a subdirectory let's say "myapp" in my ngnix folder /var/www/html/myapp  after that I went to file /etc/nginx/sites-enabled/default and edited with this lines server {     listen 0.0.0.0:80;        index ind

Laravel y MercadoPago SDK

Imagen
Hola a todos, escribo esta pequeña nota sobre como implementar el SDK que MercadoPago México ofrece, decidí hacerla porque no hay mucha información sobre esto en internet y también para no olvidar lo que yo misma hice. Quizá (y siempre lo he dicho) existan mejores maneras de hacerlo pero a mi me funcionó y por la urgencia de entregar el proyecto para ayer lo hice de esta manera. De igual forma existe un API que a mi parecer es lo ideal puesto que puedes manipular mucho mejor la información pero esa guía la publicaré después. En este punto podríamos considerar que ya tenemos un proyecto entonces solo detallaré lo que precisa. En la documentación de MercadoPago en la sección de guías - checkout mercado pago  como requisito dice que debemos descargar el sdk  por medio de composer, entonces ejecutamos esto en nuestra terminal situándonos por supuesto en la carpeta de nuestro proyecto: php composer require "mercadopago/dx-php:dev-master" Afortunadamente composer

Creating views to show specific spatial data [POSGIS POSTGRES QGIS VIEWS]

Imagen
Hello everyone, Sometimes as database managers we need to show only specific data for security or for whetever reason . In this case we are talking about showing geometry that are stored in two (relational) tables the problem remains in not showing the area , descripcion and id_user fields of state table . Fig 1. Tables Solution:  1) Create view,  2) Create role, 3)Setup in QGIS First thing is to create a view, note that is important to add the objectid column otherwise QGIS is going to get an error. CREATE VIEW view_state AS         SELECT   sg.id_state_geom AS objectid,         COALESCE(s.name, 'NO NAME'::character varying) AS name,    FROM (state_geom sg        LEFT JOIN state s ON ((sg.id_state = s.id_state)))        ORDER BY sg.id_state Second step is create a role wich be attached to the view and only to the view. CREATE ROLE xxx WITH LOGIN PASSWORD 's3cr3t'  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNT

Entrust Migration Error Solved

Imagen
Working with JWT and Entrust packages on mi brand new Laravel App I got these errors right after run the command php artisan entrust:migration I know you want the solution right away so... Error: Method Zizaco\Entrust\MigrationCommand::handle() does not exist Solution: Go to the file vendor/zizaco/entrust/src/commands/MigrationCommand.php find the method called "fire" and rename it with "handle" and after the command "php artisan entrust: migration" will be generate. But... If your scenario is identical as mine the next error will be raised... Error: Symfony\Component\Debug\Exception\FatalThrowableError  : Class name must be a valid object or a string Solution: Go to the file vendor/zizaco/entrust/src/commands/MigrationCommand.php (same file we edit before) and change these lines: $usersTable = Config::get('auth.table'); $userModel = Config::get('auth.model'); To: $usersTable = Config::get('auth.providers.user

Pentaho Data Integration and GIS Plugin

Imagen
Para la manipulación de datos GIS y operaciones con geometría existe un plugin muy interesante el cual es gratuito y puede ser descargado de aquí . La instalación del plugin es de lo más sencillo, primeramente hay que descargar el archivo y el contenido pegarlo dentro de la carpeta plugins en el directorio de pentaho, en mi caso es  D:\data-integration\plugins después de esto   se reinicia Pentaho y para ese momento si todo va bien la barra de herramientas nos mostrará la carpeta Geospatial Barra de herramientas Ahora lo importante, un ejemplo del uso de este plugin. El problema: Tenemos dos capas de datos una capa es de sectores y otra capa con terrenos. Cada terreno debe tener el dato del sector al que pertenece, en este momento los terrenos no poseen información alguna del sector al que pertenecen, hay que realizar la transformación y el resultado debe arrojar cada terreno con su num de sector correspondiente. Capa de sectores Capa de terrenos Enton

proc_open(): fork failed - Cannot allocate memory in phar

Today I got an error while I was making updates to my laravel app because of a lack of memory in my digitalocean droplet. I was reading some documentation and the solution was set up a swap file: "Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Basically, this gives you the ability to increase the amount of information that your server can keep in its working "memory", with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data." as the documentation says we need to configurate the swap area so that composer can do it's thing. The solution sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k sudo mkswap /swapfile sudo swapon /swapfile composer update Regards!