domingo, 17 de septiembre de 2017

Fix Job for supervisor.service failed when install spotipo

Instalando spotipo en una raspberry pi con raspbian jessi me lanzó el siguiente error:


-----------Running celery_get_notification-----------------------
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): spotipo.com
Starting new HTTP connection (1): spotipo.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /notifications/7fbe9ef3-b0dc-4df0-9e6f-29497c05442c HTTP/1.1" 301 None
"GET /notifications/7fbe9ef3-b0dc-4df0-9e6f-29497c05442c HTTP/1.1" 301 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): spotipo.com
Starting new HTTPS connection (1): spotipo.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /notifications/7fbe9ef3-b0dc-4df0-9e6f-29497c05442c HTTP/1.1" 200 26
"GET /notifications/7fbe9ef3-b0dc-4df0-9e6f-29497c05442c HTTP/1.1" 200 26
Job for supervisor.service failed. See 'systemctl status supervisor.service' and 'journalctl -xn' for details.
dpkg: error processing package spotipo (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 spotipo


FIX
El error ocurre porque el serivicio supervisor estaba levantado al arrancar la instalación.
Solo debes ejecutar lo siguiente antes de instalar
systemctl stop supervisor

lunes, 4 de septiembre de 2017

check if server port is open

Esta funcion de bash permite saber si un puerto está abierto en un server

is_active_port() { curl "$1" > /dev/null && echo Connected || echo Fail; }

Luego

is_active_port 192.168.3.2:5982


miércoles, 23 de agosto de 2017

Solución Problema Asterisk Now Firewall

Después de instalar y configurar Asterisk Now, es posible que te encuentres con un problema de Rechazo de Petición, esto es porque el Firewall no te permite conectarte correctamente.

Para resolver esto, ejecuta en modo root:

service iptables stop

domingo, 13 de agosto de 2017

Solucion "invalid dimen" Android Studio 3


FIX:

Abrir el fichero /etc/profile
nano /etc/profile

Añadir lo siguiente
export LC_NUMERIC="en_US.UTF-8"


Reiniciar

viernes, 11 de agosto de 2017

Set Static IP raspberry PI

edita
 sudo nano /etc/dhcpcd.conf

y ahí configuras. Ejemplo:

interface eth0

static ip_address=192.168.3.242/24
static routers=192.168.3.10
static domain_name_servers=8.8.8.8

interface wlan0

static ip_address=192.168.1.142/24
static routers=192.168.1.2
static domain_name_servers=192.168.1.2

Luego guardas y renicias

domingo, 6 de agosto de 2017

Python Scaffolding

Primero instala pyscaffold, que es el programa que permite hacer Scaffolding.
pip install --upgrade pyscaffold

Comando corto:
putup NOMBRE -l mit -d "DESCRIPCION" --with-tox --with-travis

Para más info:
http://pyscaffold.readthedocs.io/en/v2.5.7/examples.html