I don't have money to buy a domain, but I need to save all my work memories. If you are a software developer that use Mongo, NodeJS, Ionic, Angular, PHP or any Linux server distribution; maybe this blog going to help you.
I need a beer
martes, 15 de agosto de 2017
Linux / Unix ncftp: Upload Directory Tree To Remote FTP Server Recursively
- Install ncftp
- ncftpput -R -v -u "username" ftp.nixcraft.biz /nixcraft/forum /tmp/phpbb
jueves, 29 de junio de 2017
Create Postgres Role and Privileges
- Create role: CREATE USER "newuser" WITH PASSWORD 'thebestpasswordthatyouimagine'
- Create database: CREATE DATABASE 'yourdatabase'
- Privileges: GRANT ALL PRIVILEGES ON DATABASE 'yourdatabase' TO 'newuser'
- Have a cup of coffe ☕️
Configure NGINX block to new Account
- We need to create an user in the VPS: $ adduser -m "Account"
- Assign a password to the new account: passwd "Account"
-
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and ~/public_html must be executable for others ("rest of the world"):
$ chmod o+x ~
$ chmod o+x ~/public_html
$ chmod -R o+r ~/public_html
- Config Nginx creating file in: sites-available. Here an example:
- Create virtual link with: ln -s sites-available/"Account" sites-enabled/"Account"
- Restart Nginx
- Test the URL in a browser
- Have a cup of coffe
Publish Android release with Terminal
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
zipalign -v -p 4 my-app-unsigned.apk my-app-unsigned-aligned.apk
apksigner sign --ks my-release-key.jks --out my-app-release.apk my-app-unsigned-aligned.apk
jueves, 20 de abril de 2017
My Emacs configuration file
I really love Emacs. About ten years ago, I'm having use this powerful and wonderful text editor. Emacs is not only a text editor, I can update my twitter, open VIM inside his, LoL!
Currently Im using a macbook, and I have troubles with the key combinations =(.
Here Im going to show you my emacs configuration.
Bye
viernes, 14 de abril de 2017
Relational DatabaseVS NoSQL
I have almost six years working in entrepreneurships; I had a very seriously problems with some project that escalated about 300K active users. The problem was not the server, or the framework (CakePHP) - well, maybe yes. But now im not talking about that -. The real problem was from the database, and my requests to him.
The panoram is as following. I did having four tables: Tutors, Messages, MessagesUsers, Students, Fcms (Cloud messaging). When I needed to sent a message, I had to do five joins - Holy mother of god - . The operations spend about two minutes to recolect all the data.
Im Computer Science's student, and I like make the things fine. Two minutes is a eternity to the user experience. So, the only solution is make a query in a single time.
NoSQL (Mongodb) is a semi structure database. I mean, like a json. With this format, I dont need make joins between my tables, because all my data will be in a one collection (Collection is a group of documents). But there is a problem with mongodb, this database is usefull to full text processing while a relational database is perfect to numeric processing.
Summary
- NoSQL is the best to working with text and scalable processing.
- Relational databases, is the best option if you are working with numerical calculation and a few tables.
- If you have more than four joings in a only one query, further, you have more than 30K rows, and! you think in grow up your bussines. I really recomend to you use NoSQL.
Launch iPhone simulator from command line
xcrun simctl list /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID
-
cd /opt/Rocket.Chat/programs/server/npm/node_modules npm rebuild sharp
-
Nginx: 413 – Request Entity Too Large Error and Solution $ sudo nano /etc/nginx/nginx.conf client_max_body_size 2M;