Monday, March 25, 2019
Sunday, March 24, 2019
MultiSeat Architecture
References:
[1] https://support.userful.com/Manuals/Userful_Desktop/HowTo/VideoCardToUSB
[2] Def https://en.wikipedia.org/wiki/Multiseat_configuration
[3] Software https://www.geckoandfly.com/23654/virtual-desktop-software-multiple-users/
[4] Remote Desktop https://www.tecmint.com/best-remote-linux-desktop-sharing-software/
Thursday, March 21, 2019
Cuda Installation resources
Cuda 10:
[1] last version https://developer.nvidia.com/cuda-downloads
Cuda 8:
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
$ sudo ln -s /usr/bin/gcc-4.9 /usr/local/cuda/bin/gcc
$ sudo ln -s /usr/bin/g++-4.9 /usr/local/cuda/bin/g++
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[1] https://developer.nvidia.com/cuda-80-ga2-download-archive
Fluid animation tools
Courses:
[1] bridson https://www.cs.ubc.ca/~rbridson/fluidsimulation/
Resources and Source Code:
[1] PBD http://www.interactive-graphics.de/index.php/research/108-a-survey-on-position-based-dynamics-2017
Wednesday, March 20, 2019
mySQL ODBC Driver error 5.2
Error 1918. Error installing ODBC driver MySQL ODBC 5.3 ANSI Driver, ODBC error 13: The setup routines for the MySQL ODBC 5.3 ANSI Driver ODBC driver could not be loaded due to system error code 126: The
Solution:
MySQL Connector/ODBC requires Microsoft Visual C++ 2010 redistributable so you have to install it first.
Resources:
[1] MySQL Connector/ODBC 32-bit version, you have to download and install Microsoft Visual C++ 2010 Redistributable Package (x86).
[2] MySQL Connector/ODBC 64-bit version, you have to download and install Microsoft Visual C++ 2010 Redistributable Package (x64).
mySQL try to Optimize
References:
[1] https://dev.mysql.com/doc/refman/5.7/en/insert-optimization.html
[1] connection options https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters.html#codbc-dsn-option-flags
[2] autocommit problem http://www.mysqlab.net/knowledge/kb/detail/topic/innodb/id/5934
[3] 101 tips https://www.monitis.com/blog/101-tips-to-mysql-tuning-and-optimization/
[4] Create table https://dev.mysql.com/doc/refman/8.0/en/create-table.html
Tuesday, March 19, 2019
Factura electronica - Perú
Padrón de RUC
[1] ~428MB http://www.sunat.gob.pe/descargaPRR/mrc137_padron_reducido.html
[2] Servicio online ruc.com.pe
Recursos:
[1] Tutorial facturación electrónica https://www.noticierocontable.com/facturador-sunat/
[2] http://clubdecontadores.com/conoce-cinco-mitos-uso-las-facturas-electronicas/
[3] Factura electronica http://revistas.pucp.edu.pe/index.php/revistalidera/article/viewFile/16873/17181
[4] http://cpe.sunat.gob.pe/factura-desde-los-sistemas-del-contribuyente
Software:
[1] http://orientacion.sunat.gob.pe/index.php/empresas-menu/comprobantes-de-pago-empresas/comprobantes-de-pago-electronicos-empresas/facturador-sunat/6785-03-requisitos-para-su-uso
Servicio online privados
[1] jperez https://sistema.susii.net/login
[2] admin https://demo.developer-technology.com/facturacion_electronica/login.php
Proveedores:
[1] PSE http://cpe.sunat.gob.pe/quien-es-el-proveedor-de-servicios-electronicos-pse
[2] Listao PSE http://orientacion.sunat.gob.pe/index.php/empresas-menu/comprobantes-de-pago-empresas/comprobantes-de-pago-electronicos-empresas/see-desde-los-sistemas-del-contribuyente/2-comprobantes-que-se-pueden-emitir-desde-see-sistemas-del-contribuyente/factura-electronica-desde-see-del-contribuyente/3550-padron-de-proveedores-de-servicios-electronicos-pse
[3] Homologación http://orientacion.sunat.gob.pe/images/cdp-electronicos/padron-pse/ManualHomologacinPSEagosto2016.pdf
PSE Precio https://www.nubefact.com/precios
[4] https://portal.efact.pe/soluciones/factura-electronica-plataforma-online.html
Sunday, March 17, 2019
Dynamic DNS
FQDN (Fully Qualified Domain Name)
- Pc name: "deb"
- Domain name: "bar.com"
Alternatives
[1] http://neorouter.com/products-nrfree
TensorFlow Example for learn
private VPN Services
Resources:
[1] Compare https://www.wizcase.com/best-vpns-for-brazil
[2] Perú https://www.vpnfan.com/blog/best-lima-vpns/
[3] Providers Pt https://canaltech.com.br/internet/descubra-por-que-usar-uma-vpn-e-veja-como-escolher-a-melhor/
Saturday, March 16, 2019
Postgres Lectures for improve performance
References:
[1] https://revs.runtime-revolution.com/streaming-data-in-postgres-43c502a6732
https://revs.runtime-revolution.com/streaming-data-in-postgres-43c502a6732
[2] https://blog.timescale.com/scalable-postgresql-high-availability-read-scalability-streaming-replication-fb95023e2af/
[3] https://www.pipelinedb.com/
[4] https://www.citusdata.com/blog/2017/11/08/faster-bulk-loading-in-postgresql-with-copy/
[5] https://dzone.com/articles/postgresql-vs-hadoop
Stream Music from your Linux PC to Android Cellphone Speaker
1) SoundWire
2) WiFiAudio Server for Linux 64bit
References:
[1] Client https://appuals.com/stream-audio-pc-android-device/
[2] Server http://georgielabs.net/
[3] http://wifiaudio.boards.net/thread/2/wifiaudio-support-links-download-application
[4] WifiAudio Sever Linux 64bits http://wifiaudio.boards.net/attachment/download/6
Linux Remote Desktop
sudo apt-get update sudo apt-get install xrdp
#desktop
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
#setting session
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
#firewall
sudo ufw allow 3389/tcp
#Use remmina desktop to connect
Extra
service --status-all
printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"References:
[1] Setting xrdp https://medium.com/@vivekteega/how-to-setup-an-xrdp-server-on-ubuntu-18-04-89f7e205bd4e
[2] https://websiteforstudents.com/connect-to-ubuntu-16-04-17-10-18-04-desktop-via-remote-desktop-connection-rdp-with-xrdp/
[3] Print desktop name and session
https://askubuntu.com/questions/72549/how-to-determine-which-window-manager-is-running
Friday, March 15, 2019
SSH Skip port forwarding
Instant terminal sharing
https://tmate.io/
Share your UNIX terminal in seconds!
https://www.teleconsole.com/
Share local machine port to public access
https://github.com/milio48/serveo
$wget https://raw.githubusercontent.com/milio48/serveo/master/serveo.sh
$./serveo.sh tcp 5432 0
vs ngrok
Serveo is an excellent alternative to ngrok. Serveo was inspired by ngrok and attempts to serve many of the same purposes. The primary advantage of Serveo over ngrok is the use of your existing SSH client, so there's no client application to install.
Other slight advantages include preservation of URLs across reconnect for free (ngrok allows this only for paid accounts) and in-terminal request inspection and replay (ngrok uses a web interface).
vs OpenSSH
Using Serveo instead of OpenSSH frees you from having to configure and maintain a server. It also handles HTTPS and subdomain generation, two features that complicate a typical SSH port-forwarding setup.
Apache Guacamole is a clientless remote desktop gateway
http://guacamole.apache.org/
Manual mode (A like to connect to B)
PCA ----+---- PCB
|
PCX
Server Side (PCX Need root permission)
$sudo vi /etc/ssh/sshd_config
AllowTcpForwarding yes
GatewayPorts yes
$sudo firewall-cmd --add-port=7004/udp [--permanent]
$sudo firewall-cmd --add-port=7004/tcp [--permanent]
Target PCB
$ssh -f -N -R 7004:127.0.0.1:22 -l user_PCX -p port PCX(ip/domain name)
This means open port 7004 on PCX forwarding to port 22, PCX will start to listen on port 7004.
Source PCA
$ssh PCX(ip/domain name) -l user_PCB -p 7004
Enjoy!
References:
[1] https://rootsaid.com/ssh-without-port-forwarding/
[2] https://linuxhint.com/ssh-port-forwarding-linux/
[3] https://dev.to/samuyi/the-how-to-of-ssh-port-forwarding-1f4e
Thursday, March 14, 2019
Course of Deep Learning
Resources:
[1] Cutting-Edge Trends in Deep Learning and Recognition http://slazebni.cs.illinois.edu/spring17/
[2] Course Deep Learning https://nthu-datalab.github.io/ml/
[3] Colab https://medium.com/deepquestai/train-object-detection-ai-with-6-lines-of-code-6d087063f6ff
Tuesday, March 12, 2019
Review documents
Resources:
[1] https://www.visaoerevisao.com
[2] https://www.editage.com.br
[3] http://www.nativeenglish.com.br/ (word)
Monday, March 11, 2019
Ubuntu route (s)
ip route list
route
route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.169.5.1
sudo route del -net 192.168.76.0/24
and
sudo route del -net 192.168.76.0 netmask 255.255.255.0
References:
[1] https://www.cyberciti.biz/faq/linux-route-add/
Sunday, March 10, 2019
mySql Optimize date queries and inserts
High Level of use
DROP INDEX VENTAS_fecven_idx ON VENTAS
select * from VENTAS where date(fecven)='2019-03-09' #~2.81
select * from VENTAS where fecven >='2019-03-09 00:00:00' and fecven<'2019-03-10 00:00:00' #~2.9
select * from VENTAS where fecven Between '2019-03-09 00:00:00' and '2019-03-10 00:00:00' #~3.6
CREATE INDEX VENTAS_fecven_idx ON VENTAS (fecven)
select * from VENTAS where date(fecven)='2019-03-09' #~2.794
select * from VENTAS where fecven >='2019-03-09 00:00:00' and fecven<'2019-03-10 00:00:00' #~0.265
select * from VENTAS where fecven Between '2019-03-09 00:00:00' and '2019-03-10 00:00:00' #~0.261
CREATE INDEX MOVPRO_fecmov_idx ON MOVPRO (fecmov)
#change date(fecmov) between f1 and f2
#to fecmov between f1 and f2 #implicit add 00:00:00
DROP INDEX MOVPRO_fecmov_idx ON MOVPRO
Setting mysql
SET GLOBAL bulk_insert_buffer_size = 1024 * 1024 * 128;
[mysqld]
bulk_insert_buffer_size=128M
References
[1] Insert https://dev.mysql.com/doc/refman/8.0/en/insert-optimization.html
[2] Amazon Best Practices https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_BestPractices.html
Saturday, March 09, 2019
Linux Discovery ports
Mac
sudo lsof -iTCP -sTCP:LISTEN
Linux
List used ports
$netstat -tulpn | grep LISTEN
tcp 0 0 127.0.0.1:5939 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
List process that using port
You like to knows who is using port 80, then
$sudo lsof -i :80
apache2 965 root 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13794 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13795 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13796 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13797 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13798 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
Second option
$sudo netstat -peanut | grep ":80"
tcp6 0 0 :::80 :::* LISTEN 0 26650 965/apache2
Setting apache
$vi /etc/apache2/apache2.conf
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf-enabled
# | `-- *.conf
# `-- sites-enabled
# `-- *.conf
sudo lsof -iTCP -sTCP:LISTEN
Linux
List used ports
$netstat -tulpn | grep LISTEN
tcp 0 0 127.0.0.1:5939 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
List process that using port
You like to knows who is using port 80, then
$sudo lsof -i :80
apache2 965 root 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13794 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13795 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13796 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13797 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
apache2 13798 www-data 4u IPv6 26650 0t0 TCP *:http (LISTEN)
Second option
$sudo netstat -peanut | grep ":80"
tcp6 0 0 :::80 :::* LISTEN 0 26650 965/apache2
Setting apache
$vi /etc/apache2/apache2.conf
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf-enabled
# | `-- *.conf
# `-- sites-enabled
# `-- *.conf
Thursday, March 07, 2019
PostgreSQL 8.4 en CentOS
1) Deshabilitar repositorios
#vi /etc/yum.repos.d/CentOS-Base.repo
agregar la siguiente linea a [base] y [updates]
exclude=postgresql*
2) Añadir los repositorios de PostgreSQL 8.4
Descargar el rpm apropiado desde http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html
#wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
#rpm -ivh pgdg-centos-8.4-2.noarch.rpm (este archivos es el que descargamos)
3) Instalar PostgreSQL
3.1 verifique version
#yum list postgresql*
#yum install postgresql postgresql-server
3.1 Error probable de dependencia a apr-util
#yum install apr-util
#yum install postgresql postgresql-server
4) Arrancar el servidor y habilitar conexiones remotas
#service postgresql initdb
#service postgresql start
5) Configurar Accesos en /var/lib/pgsql/data/
5.1 pg_hba.conf
host all all 0.0.0.0/0 trust #no need password , use md5
5.2 postgresql.conf
listen_addresses='*'
port=5432
max_connections=100
superuser_reserved_connections=5
6) Reinicia servicio
#/etc/init.d/postgresql restart
Referencias
[0] Postgres 9.1 http://wiki.postgresql.org/wiki/YUM_Installation
[1] Auto Start/Stop http://www.michaelhinds.com/tech/linux/install-postgres.html
[2] http://www.ixavi.com/2010/01/instalar-postgresql-8-3-en-centos-desde-yum/
#vi /etc/yum.repos.d/CentOS-Base.repo
agregar la siguiente linea a [base] y [updates]
exclude=postgresql*
2) Añadir los repositorios de PostgreSQL 8.4
Descargar el rpm apropiado desde http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html
#wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
#rpm -ivh pgdg-centos-8.4-2.noarch.rpm (este archivos es el que descargamos)
3) Instalar PostgreSQL
3.1 verifique version
#yum list postgresql*
#yum install postgresql postgresql-server
3.1 Error probable de dependencia a apr-util
#yum install apr-util
#yum install postgresql postgresql-server
4) Arrancar el servidor y habilitar conexiones remotas
#service postgresql initdb
#service postgresql start
5) Configurar Accesos en /var/lib/pgsql/data/
5.1 pg_hba.conf
host all all 0.0.0.0/0 trust #no need password , use md5
5.2 postgresql.conf
listen_addresses='*'
port=5432
max_connections=100
superuser_reserved_connections=5
6) Reinicia servicio
#/etc/init.d/postgresql restart
Referencias
[0] Postgres 9.1 http://wiki.postgresql.org/wiki/YUM_Installation
[1] Auto Start/Stop http://www.michaelhinds.com/tech/linux/install-postgres.html
[2] http://www.ixavi.com/2010/01/instalar-postgresql-8-3-en-centos-desde-yum/
Linux root password reset
Mode 1:Recover mode
In recover mode try to remount and after that change password
mount -o remount,rw /
Mode 2: Using live
mkdir /mnt/recover
mount /dev/sda2 /mnt/recover
chroot /mnt/recover
passwd #or
passwd user
exit
umount /mnt/recover
Other way : Using files(for root or any user)
/etc/passwd
/etc/shadow
root:x:0:0:root:/root:/bin/bash
to
root::0:0:root:/root:/bin/bash
References:
[1] http://www.microhowto.info/howto/reset_a_forgotten_root_password_using_a_live_distribution.html
[2] https://www.computersecuritystudent.com/UNIX/UBUNTU/1204/lesson5/index.html
Monday, March 04, 2019
Sunday, March 03, 2019
Raspberry Resources
DOSBox and rpi-x86 will play DOS games and run Win31/Win95.
QEMU can be used to emulate an x86 PC but performance will be terrible.
Wine will not work because it does not translate binary data, only Windows API calls, the binaries are still incompatible.
This is a difficult problem to solve which is probably why ExaGear charge money for it.
QEMU can be used to emulate an x86 PC but performance will be terrible.
Wine will not work because it does not translate binary data, only Windows API calls, the binaries are still incompatible.
This is a difficult problem to solve which is probably why ExaGear charge money for it.
Resources:
[1] Chart comparison all famous Arm processors https://www.loverpi.com/blogs/news/85588545-raspberry-pi-banana-pi-orange-pi-odroid-differences-and-chart
[2] Odroid vs other https://tudosobreraspberry.info/2017/08/comparacao-raspberry-pi-orange-pi-banana-pi-e-odroid/
[3] Raspberry Pi3 vs UDOO x86 https://www.youtube.com/watch?v=dJkHxDjFuNA
[4] Combine qemu and wine for run Windows applications https://github.com/AlbrechtL/RPi-QEMU-x86-wine
[5] https://www.kickstarter.com/projects/udoo/udoo-x86-the-most-powerful-maker-board-ever/?src=soc
[6] https://www.raspberrypi.org/forums/viewtopic.php?t=189198
[7] https://elchapuzasinformatico.com/2016/04/udoo-x86-10-veces-mas-potente-raspberry-pi-3-79e/
[8] https://www.redeszone.net/2016/05/20/udoo-x86-mini-ordenador-10-veces-mas-potente-raspberry-pi-3/
[9] https://www.anandtech.com/show/11978/macom-sells-off-appliedmicros-xgene-cpu-business
[1] Experimental comparison Raspberry and Orange https://raspberryparatorpes.net/rivales/raspberry-pi-vs-orange-pi-2017/
Ubuntu users
#adduser username
#usermod -aG sudo username
$
su - username
$whoami
$sudo whoami
Examples to use
$fdisk -l
$sudo fdisk -l
$sudo ls -l /root
Saturday, March 02, 2019
mySql Optimization parameters or commands
Query
SHOW GLOBAL STATUS
SHOW VARIABLES LIKE '%size%';
SHOW GLOBAL VARIABLES LIKE '%size%';
Settings
SET GLOBAL join_buffer_size = 1024 * 1024 * 128 #128M
or
[mysqld]
join_buffer_size = 128M #default ~256K
References:
[0] Compute memory http://mysqlcalculator.com/
[1]
https://dba.stackexchange.com/questions/74693/how-to-break-table-into-two-without-losing-performance
join_buffer_size
[2] https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html
[3] Example tunning https://dba.stackexchange.com/questions/127862/tuning-mysql-variables-to-accommodate-high-load
[4] Query variables https://dev.mysql.com/doc/refman/8.0/en/show-variables.html
Sunat Servicios Web
JavaScript Frameworks Lecture
References:
[1] https://reactjs.org/
[2] https://www.w3schools.com/whatis/whatis_react.asp
[3] Repository https://github.com/facebook/react
mySql Common Commands
CREATE TABLE foo LIKE bar;
CREATE TABLE IF NOT EXISTS offices_bk
SELECT * FROM
offices;
==
CREATE TABLE IF NOT EXISTS new_table LIKE existing_table;
INSERT new_table
SELECT * FROM existing_table;
ALTER TABLE <tablename> CHANGE COLUMN <colname> <colname> VARCHAR(65536);
ALTER TABLE emp MODIFY COLUMN name VARCHAR(100);
Or use CHANGE, but that means you have to give the column name twice
(because CHANGE allows you to change the name of the column too).ALTER TABLE emp CHANGE COLUMN name name VARCHAR(100);
Subscribe to:
Posts (Atom)
-
Resources: [1] Hela https://ome.grc.nia.nih.gov/iicbu2008/hela/index.html
-
en inglés se llama “A potentially dangerous Request.Form value was detected from the client”. varias páginas indican dos cosas: 1. agrega...
-
mas plugins http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html http://www.extjs.com/deploy/dev/...
Odoo 17 - Custom adds
[1] Diario/Seq https://apps.odoo.com/apps/modules/17.0/sequence_for_journal