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);
Friday, March 01, 2019
Linux Discover Teamviewer id
$sudo grep -n id /home/user/.local/share/teamviewer14/logfiles/TeamViewer14_Logfile.log
$whereis teamviewer
$/usr/bin/teamviewer help
$/usr/bin/teamviewer info #for get id too
$/usr/bin/teamviewer daemon stop
$/usr/bin/teamviewer setup
$/usr/bin/teamviewer daemon status
$/usr/bin/teamviewer daemon start
References:
[1] http://www.tonisoto.com/2013/07/launching-teamviewer-remotely-throught-ssh/
Thursday, February 28, 2019
mySql change port problem
Can't start server: Bind on TCP/IP port: Permission denied
Do you already have another mysqld server running on port: 13306 ?
Common solution is change my.cnf adding port=newport, but in what section?
Discover who is the principal executable
$locate mysqld.service
/etc/systemd/system/multi-user.target.wants/mysqld.service
/usr/lib/systemd/system/mysqld.service
$vi /usr/lib/systemd/system/mysqld.service #for watch settings
In my case, was this:
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
then i know what section i need to change
$vi /etc/my.cnf # add new port in section [mysqld_safe]
Aditional commands during process:
tail -30 /var/log/mysql/error.log
Do you already have another mysqld server running on port: 13306 ?
Common solution is change my.cnf adding port=newport, but in what section?
Discover who is the principal executable
$locate mysqld.service
/etc/systemd/system/multi-user.target.wants/mysqld.service
/usr/lib/systemd/system/mysqld.service
$vi /usr/lib/systemd/system/mysqld.service #for watch settings
In my case, was this:
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
then i know what section i need to change
$vi /etc/my.cnf # add new port in section [mysqld_safe]
Aditional commands during process:
tail -30 /var/log/mysql/error.log
sudo lsof -i TCP:3306
netstat -lp | grep 3306
$systemctl status iptables.service
$service iptables status
Wednesday, February 27, 2019
Ubuntu mySQL Backup/Restore
1)Create
2) Restore
$mysql -u root -p mysql
> create database mydb; mysql
> use mydb; mysql
> source db_backup.dump;
3) Another way, you need to run:
$mysql -p -u[user] [database] < db_backup.dump
If the dump contains multiple databases you should omit the database name:
$mysql -p -u[user] < db_backup.dump
4) Restore specific database
$mysql -u onepoint -p --one-database maxx2016 < back_20190226.sql
2) Restore
$mysql -u root -p mysql
> create database mydb; mysql
> use mydb; mysql
> source db_backup.dump;
3) Another way, you need to run:
$mysql -p -u[user] [database] < db_backup.dump
If the dump contains multiple databases you should omit the database name:
$mysql -p -u[user] < db_backup.dump
4) Restore specific database
$mysql -u onepoint -p --one-database maxx2016 < back_20190226.sql
Monday, February 25, 2019
Ubuntu Apache Django settings
References:
[1] main https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-16-04
[2] https://coderwall.com/p/ooerda/python-django-apache-ubuntu
[3] https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8
Fixing geopandas and osmnx problem: Could not find libspatialindex_c library file
For secondary problem trying to resolve (trying to find the library i got):
Traceback (most recent call last):
File "", line 1, in
NameError: name 'find_library' is not defined
The solution is:
$python
>>> import rtree
Traceback (most recent call last):
File "", line 1, in
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/__init__.py", line 1, in
from .index import Rtree
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/index.py", line 5, in
from . import core
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/core.py", line 125, in
raise OSError("Could not find libspatialindex_c library file")
OSError: Could not find libspatialindex_c library file
You can solve using:
sudo apt install python3-rtree
But in some servers, you can't access to apt, then you decide do next commands:
$git clone https://github.com/libspatialindex/libspatialindex.git
$cd libspatialindex
$cmake --prefix=/usr .
$make
$sudo make install #You cannot install on system
CMake Error at src/cmake_install.cmake:52 (file):
file INSTALL cannot copy file
"/home/fincahuanaco/Temp/libspatialindex/bin/libspatialindex.so.5.0.0" to
"/usr/local/lib/libspatialindex.so.5.0.0".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
But you compile, then you have the link to file, then set next variable
export SPATIALINDEX_C_LIBRARY=environmentpath/lib/libspatialindex_c.so
Enjoy
References:
[1] geopandas http://geopandas.org/install.html
[2] python environment https://docs.python-guide.org/dev/virtualenvs/
[3] python environment 2 https://docs.python.org/3/tutorial/venv.html
Traceback (most recent call last):
File "
NameError: name 'find_library' is not defined
The solution is:
import ctypes
from ctypes.util import find_library
When you install environment and install geopandas, rtree and osmnx
pip install git+git://github.com/geopandas/geopandas.git
pip install rtree
pip install osmnx
No error, everythong aparently is ok, and you try to test$python
>>> import rtree
Traceback (most recent call last):
File "
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/__init__.py", line 1, in
from .index import Rtree
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/index.py", line 5, in
from . import core
File "/var/www/sampleapp/crivist/myEnv/lib/python3.5/site-packages/rtree/core.py", line 125, in
raise OSError("Could not find libspatialindex_c library file")
OSError: Could not find libspatialindex_c library file
You can solve using:
sudo apt install python3-rtree
But in some servers, you can't access to apt, then you decide do next commands:
$git clone https://github.com/libspatialindex/libspatialindex.git
$cd libspatialindex
$cmake --prefix=/usr .
$make
$sudo make install #You cannot install on system
CMake Error at src/cmake_install.cmake:52 (file):
file INSTALL cannot copy file
"/home/fincahuanaco/Temp/libspatialindex/bin/libspatialindex.so.5.0.0" to
"/usr/local/lib/libspatialindex.so.5.0.0".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
But you compile, then you have the link to file, then set next variable
export SPATIALINDEX_C_LIBRARY=environmentpath/lib/libspatialindex_c.so
Enjoy
References:
[1] geopandas http://geopandas.org/install.html
[2] python environment https://docs.python-guide.org/dev/virtualenvs/
[3] python environment 2 https://docs.python.org/3/tutorial/venv.html
Level Set Topics
References:
[1] Methods In (Bio)Medical Image Analysis 2019 https://www.cs.cmu.edu/~galeotti/methods_course/
Saturday, February 23, 2019
Thursday, February 21, 2019
Latex On Line
Latex online
[1] Single/public https://www.papeeria.com
[2] Latex/R/Python/Octave/Julia/Shell/GPU https://cocalc.com/
[3] Single
Latex & Octave http://www.verbosus.com/ #limit 4 resources
[4] Quick snap code to image quicklatex.com
Over google docs
http://docs.latexlab.org/
Single Compiler
[1] http://latex.informatik.uni-halle.de/latex-online/latex.php
[2] http://sciencesoft.at/latex/flatex.gsp?lang=en
After register
Unlimited https://www.sharelatex.com/
Monkey http://monkeytex.bradcater.webfactional.com/
Others References
[1] http://tex.stackexchange.com/questions/3/compiling-documents-online
[2] http://texblog.net/latex-link-archive/online-compiler/
Labels:
Latex,
Linux,
Linux.Developer,
Windows.Developer
Wednesday, February 20, 2019
Python 3D Interactive
[1] Python draw 2d and 3d http://jeffskinnerbox.me/notebooks/matplotlib-2d-and-3d-plotting-in-ipython.html
[2] Python 3D picking https://stackoverflow.com/questions/10424517/how-to-get-properties-of-picked-object-in-mplot3d-matplotlib-python
[3] Python mayavi picking http://docs.enthought.com/mayavi/mayavi/auto/example_pick_on_surface.html
[4] Python mayavi for 3D https://docs.enthought.com/mayavi/mayavi/mlab.html
Fedora 23 - Executing MONO Asp.NET MVC App
Table 'mysql.user' doesn't exist:ERROR
Or
ERROR 1146 (42S02): Table 'mysql.role_edges' doesn't exist
$mysql_upgrade -u root
Access problem (resolve inner mysql)
$mysql -u root -p
>show GRANTS FOR onepoint@localhost;
Execution problem
Turns out simply creating the folder using mkdir
$sudo mkdir /etc/mono/registry
$sudo chmod uog+rw /etc/mono/registry # setting the right permissions
Another way
You can set MONO_REGISTRY_PATH to point to a directory that you control:
$mkdir my-registry
$MONO_REGISTRY_PATH=`pwd`/my-registry
$xsp4
Next problem
System.MissingMethodException Method 'RouteCollection.get_AppendTrailingSlash' not found.
[uxxx@sxxx MaxxCoreWeb]$ mono --version
Mono JIT compiler version 4.0.5 (Stable 4.0.5.1/1d8d582 Mon Jan 4 11:09:45 UTC 2016)
These message showed because the system was build in mono 4.5 and mono 4.2 (both are compatible
for me in my system), but in my case i installed mono 4, lastest on Fedora 23.
Command for update repository to Fedora 27, but after update still doesn't ran
$rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
$su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'
$dnf update
I removed mono and tried to install mono 5, mono 4.8 and mono 4.2, but i got error of conflicts. Then i executed next command:
$sudo dnf autoremove #for remove dependences
And tried again and was successful.
$ sudo dnf install mono-complete-4.8.1.0-0.xamarin.1.x86_64
References:
[1] Upgrade tips https://fedoraproject.org/wiki/DNF_system_upgrade
[2] mono https://www.mono-project.com/download/stable/#download-lin-fedora
Fedora 23 Services
$systemctl status sshd.service
$systemctl enable httpd.service
$systemctl disable service_name.service
$systemctl start service_name.service
$systemctl stop service_name.service
$systemctl restart service_name.service
$systemctl list-units --type=service
References:
[1] General info https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/infrastructure-services/Services_and_Daemons/
[2] List services https://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/s1-services-running.html
Tuesday, February 19, 2019
Ubuntu mySQL Setting for remote access
1) Verify if is listenning
$wget --verbose http://localhost:3306
$wget --verbose http://192.168.0.12:3306
or
$nmap -sV localhost
$nmap -sV 192.168.0.12
or
$sudo netstat -tulpn
or
$sudo iptables -L -n
2) Verify file /etc/mysql/conf.d/ #include other possibles files
$sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf #edit file and comment next line, or
$sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf
#bind-address = 127.0.0.1
3) Add user
mysql>select user, host, authentication_string from mysql.user;
mysql>SHOW GRANTS FOR 'onepoint'@'%'; #if not exist
mysql> CREATE USER 'onepoint'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON Maxx2018.* TO 'onepoint'@'localhost' WITH GRANT OPTION;
mysql>CREATE USER 'onepoint'@'%' IDENTIFIED BY 'password';
mysql>GRANT ALL PRIVILEGES ON *.* TO 'onepoint'@'%' WITH GRANT OPTION;
mysql>GRANT ALL PRIVILEGES ON *.* TO 'onepoint'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
4) Update user
mysql>use mysql;
mysql>update user set password=PASSWORD("NEWPASSWORD") where User='root';
mysql>flush privileges;
5) Common Errors
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
You can edir /etc/mysql/my.cnf, but then you will have a security risk!
in [mysqld] add:
References:
[1] Firewall ubuntu https://stackoverflow.com/questions/30251889/how-to-open-some-ports-on-ubuntu
[2] https://stackoverflow.com/questions/14779104/how-to-allow-remote-connection-to-mysql
$wget --verbose http://localhost:3306
$wget --verbose http://192.168.0.12:3306
or
$nmap -sV localhost
$nmap -sV 192.168.0.12
or
$sudo netstat -tulpn
or
$sudo iptables -L -n
2) Verify file /etc/mysql/conf.d/ #include other possibles files
$sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf #edit file and comment next line, or
$sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf
#bind-address = 127.0.0.1
3) Add user
mysql>select user, host, authentication_string from mysql.user;
mysql>SHOW GRANTS FOR 'onepoint'@'%'; #if not exist
mysql> CREATE USER 'onepoint'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON Maxx2018.* TO 'onepoint'@'localhost' WITH GRANT OPTION;
mysql>CREATE USER 'onepoint'@'%' IDENTIFIED BY 'password';
mysql>GRANT ALL PRIVILEGES ON *.* TO 'onepoint'@'%' WITH GRANT OPTION;
mysql>GRANT ALL PRIVILEGES ON *.* TO 'onepoint'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
4) Update user
mysql>flush privileges;
5) Common Errors
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
SET GLOBAL validate_password_policy=LOW;
You can edir /etc/mysql/my.cnf, but then you will have a security risk!
in [mysqld] add:
validate_password_policy=LOW
References:
[1] Firewall ubuntu https://stackoverflow.com/questions/30251889/how-to-open-some-ports-on-ubuntu
[2] https://stackoverflow.com/questions/14779104/how-to-allow-remote-connection-to-mysql
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