Entradas

Mostrando las entradas de abril, 2017

How to pass data from Javascript to PHP and vice versa?

Desde Javascript <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv = "Content-Type" content = "text/html; charset=iso-8859-1" /> <script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type = "text/javascript" ></script> <title> Test Page </title> <script> function passVal (){ var data = { fn : "filename" , str : "this_is_a_dummy_test_string" }; $ . post ( "test.php" , data ); } passVal (); </script> </head> <body> </body> </html> PHP servidor <? php $fn = $_POST [ 'fn' ]; $str = $_POST [ 'str' ]; $file = fopen ( "/opt/lampp/htdocs/passVal/" . $fn . ".record

Terminal Rs232

http://www.societyofrobots.com/robotforum/index.php?topic=7004.0 http://cutecom.sourceforge.net/ https://wiki.gnome.org/moserial

Boot

Creating a Bootable USB Drive On Ubuntu and Ubuntu MATE GNOME Disks is pre-installed on Ubuntu 16.04 and newer. Use the Restore Disk Image… option, which natively supports XZ compressed images . If Disks is not present on your system, you can install it from the terminal: sudo apt-get install gnome-disk-utility        otro https://www.lifewire.com/create-uefi-bootable-linux-mint-usb-2202084    http://alternativeto.net/software/rufus/?platform=linux

Boot

https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu https://www.ubuntu.com/download/desktop

Instalar Brackets

sudo add-apt-repository ppa:webupd8team/brackets sudo apt-get update sudo apt-get install brackets

Install phpmyadmin

Source Introduction While many users need the functionality of a database management system like MySQL, they may not feel comfortable interacting with the system solely from the MySQL prompt. phpMyAdmin was created so that users can interact with MySQL through a web interface. In this guide, we'll discuss how to install and secure phpMyAdmin so that you can safely use it to manage your databases from an Ubuntu 16.04 system. Prerequisites Before you get started with this guide, you need to have some basic steps completed. First, we'll assume that you are using a non-root user with sudo privileges, as described in steps 1-4 in the initial server setup of Ubuntu 16.04 . We're also going to assume that you've completed a LAMP (Linux, Apache, MySQL, and PHP) installation on your Ubuntu 16.04 server. If this is not completed yet, you can follow this guide on installing a LAMP stack on Ubuntu 16.04 . Finally, there are important security consider

Install LAMP

Source 1 sudo apt - get install lamp - server ^ It’s important to remember the caret (^) at the end of the command. Thought I’d get that out the way for all the hit and runners looking for the command! WARNING! The use of ^ in the package name suggests that this is a ‘meta-package’. Meaning a number of programs that are usually installed together. If you try to remove this ‘meta-package’ you could remove a lot of programs you are not expecting to… SSH being one of them! So please do install your lamp server using these instructions, but do not remove it using lamp-server^ Let’s proceed…… What is LAMP Server LAMP Server is a collection of open source software used to create a web server. The collection consists of: Linux – the operating system Apache server – the server MySQL – the database system PHP – the programming language Clearly named after the initials of its components, these four applications are all lengthy subjects in their

Phonegap PHP

SOURCE

Mysql Remote problems

Source Setup privilegies When you connect to a MySQL server, it checks it’s grants table (the “user” table in the “mysql” database on the MySQL server) against the IP address of the connecting MySQL client machine. If there are NO MATCHING ENTRIES in the “host” column in the “user” table in the “mysql” database, mysqld will IMMEDIATELY CLOSE THE CONNECTION with ERROR 1130. For example, a client (192.168.0.2) tries to connect to it’s MySQL server (192.168.0.100) and gets: [root@dbclient ~]# mysql -u jennifer --password=toughPassword -h 192.168.0.100 my_database ERROR 1130 (HY000): Host '192.168.0.2' is not allowed to connect to this MySQL server [root@dbclient ~]# ..a simple “telnet” TCP-connection test proves that the problem is not a firewall – the client is able to get to port 3306 (the MySQL port) on the database server: [root@dbclient ~]# telnet 192.168.0.100 3306 Trying 192.168.0.100... Connected to 192.168.0.100. Escape character is '^]'. GHost '1

PHONE GAP + PHP

Imagen
SOURCE

AJAX ADD & RETRIEVE MYSQL RECORDS USING JQUERY & PHP

Source

Plugins for Apache Cordova

PLUGREG   ,  NPM , and CORDOVA

Install Oracle JAVA 8

Source First of all you need to add webupd8team Java PPA repository in your system. After that install, Oracle Java 8 using following a set of commands. $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer Verify Installed Java Version After successfully installing oracle Java using above step verify installed version using the following command. rahul@tecadmin:~$ java -version java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode, sharing) Configuring Java Environment Also, install java configuration package. It seems like below package is already installed with latest operating systems during installation of JAVA packages. But you can still make sure by running below command. $ sudo apt-get install oracle-java8-set-default Now edit /etc/environment configuration file and add following entries to set JAVA_H

Java and Android SDK Configurations ubuntu

Imagen
Source JAVA_HOME=/usr/lib/jvm/java-9-openjdk-amd64/ export JAVA_HOME PATH=$JAVA_HOME/bin:$JAVA_HOME/db/bin:$JAVA_HOME/jre/bin
https://rootsudo.wordpress.com/2014/04/06/el-path-la-ruta-de-linux-variables-de-entorno/

How to set Android SDK path in Ubuntu?

Imagen

Installing MongoDB

Source Introduction MongoDB is a free and open-source NoSQL document database used commonly in modern web applications. This tutorial will help you set up MongoDB on your server for a production application environment. As of publication time, the official Ubuntu 16.04 MongoDB packages have not yet been updated to use the new systemd init system which is enabled by default on Ubuntu 16.04 . Running MongoDB using those packages on a clean Ubuntu 16.04 server involves following an additional step to configure MongoDB as a systemd service that will automatically start on boot. Prerequisites To follow this tutorial, you will need: One Ubuntu 16.04 server set up by following this initial server setup tutorial , including a sudo non-root user Step 1 — Adding the MongoDB Repository MongoDB is already included in Ubuntu package repositories, but the official MongoDB repository provides most up-to-date version and is the recommended way of installing the software. In this

Zeal

Zeal  https://zealdocs.org/ Zeal is an offline documentation browser for software developers. Ubuntu Install Zeal from the official repositories: $ sudo apt-get install zeal When the official package becomes outdated, our own PPA repository provides an up-to-date version. Run the following commands to use the PPA: $ sudo add-apt-repository ppa:zeal-developers/ppa $ sudo apt-get update $ sudo apt-get install zeal

Jinja2

Jinga Documantation  Jinja2 is a modern and designer-friendly templating language for Python, modelled after Django’s templates. It is fast, widely used and secure with the optional sandboxed template execution environment: < title > {% block title %}{% endblock %} </ title > < ul > {% for user in users %} < li >< a href = " {{ user.url }} " > {{ user.username }} </ a ></ li > {% endfor %} </ ul > Features: sandboxed execution powerful automatic HTML escaping system for XSS prevention template inheritance compiles down to the optimal python code just in time optional ahead-of-time template compilation easy to debug. Line numbers of exceptions directly point to the correct line in the template. configurable syntax

Forever for Python

It is easy to use Python with forever.js: forever start -c python manage.py runserver   To use it with virtualenv is a little bit more complicated, I did it using a bash script (call it python_virtualenv ): #!/bin/bash # Script to run a Python file using the local virtualenv source bin / activate bin / python $@   Now use that script with forever: forever start - c ./ python_virtualenv python_script . py

Hosting App

Hosting the Node JS app. So we already have our node js app on this github repo , or the one that you created. We used the One Click apps to set up our droplet, so we have all the dependencies we need. If we hadn't done this, we'd have to follow these steps to do it run our app. Get into our droplet Install Git Install NodeJS Clone our repo Serve the app. Now, we can only focus on the last two. Get into droplet Lets ssh into the droplet with the IP. Remember to replace the IP with your IP address from the Digital Ocean control panel. We should have a prompt like this. $ ssh root@138.197.80.147 root@nodejs-512mb-nyc3-01:~ # Note your terminal may ocasionally hang depending on your internet connection, because SSH needs to maintian an open connection. In case this happens, just close the terminal, and start again. Install Git and NodeJS We already have these installed. We can just confirm by root@nodejs-512mb-nyc3-01:~ # git --version git version

Proxy Server

Set Up Reverse Proxy Server Now that your application is running, and listening on a private IP address, you need to set up a way for your users to access it. We will set up an Nginx web server as a reverse proxy for this purpose. This tutorial will set up an Nginx server from scratch. If you already have an Nginx server setup, you can just copy the location block into the server block of your choice (make sure the location does not conflict with any of your web server's existing content). On the web server, let's update the apt-get package lists with this command: sudo apt-get update Then install Nginx using apt-get: sudo apt-get install nginx Now open the default server block configuration file for editing: sudo vi /etc/nginx/sites-available/default Delete everything in the file and insert the following configuration. Be sure to substitute your own domain name for the server_name directive (or IP address if you don't have a domain set up), and t

Deployment 2

 Tutorial

Deploy Node js app

Imagen
Source Otra forma Heroku