This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Generating table backup: | |
mysqldump databaseName tableName > backup.sql -u user -p | |
#Restore table backup: | |
mysql -u root -p databaseName < backup.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install nautilus-image-converter | |
#After finish the installation restart nautilus | |
killall nautilus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add execute permission to script | |
~/mipc> chmod +x script.sh | |
# Copy script in directory that your system. | |
# there are two directories to copy the executable script | |
# 1 - Only available for the user of the system - /usr/bin or /usr/local/bin | |
# 2 - For share in all users of the system - /usr/local/bin | |
#1 ~/mipc> sudo cp script.sh /usr/bin/script | |
#2 ~/mipc> sudo cp script.sh /usr/local/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ethanf.in_app_billing_ex2; | |
import com.ethanf.in_app_billing_ex2.util.IabHelper; | |
import com.ethanf.in_app_billing_ex2.util.Inventory; | |
import com.ethanf.in_app_billing_ex2.util.IabResult; | |
import com.ethanf.in_app_billing_ex2.util.Purchase; | |
import com.ethanf.in_app_billing_ex2.util.SkuDetails; | |
import android.os.Bundle; | |
import android.app.Activity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ethanf.in_app_billing_ex; | |
import java.util.ArrayList; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import com.android.vending.billing.IInAppBillingService; | |
import android.os.Bundle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Iterate in Bundle | |
Bundle mBundle = data.getExtras(); | |
for (String key : mBundle.keySet()) { | |
Log.e(key, mBundle.get(key).toString()); | |
} | |
//Iterate in SharedPreferences | |
SharedPreferences myShPref = getSharedPreferences("mySharedPreferences", Context.MODE_PRIVATE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From php5.6 to php7.0: | |
Apache: | |
sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart | |
CLI: | |
sudo update-alternatives --set php /usr/bin/php7.0 | |
From php7.0 to php5.6: | |
Apache: | |
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart | |
CLI: | |
sudo update-alternatives --set php /usr/bin/php5.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NGINX UBUNTU UBUNTU 16.04 | |
Introduction | |
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or a reverse proxy. | |
In this guide, we'll discuss how to get Nginx installed on your Ubuntu 16.04 server. | |
Prerequisites | |
Before you begin this guide, you should have a regular, non-root user with sudo privileges configured on your server. You can learn how to configure a regular user account by following our initial server setup guide for Ubuntu 16.04. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From the man page: | |
--user=user_name, -u user_name | |
--password[=password], -p[password] | |
These work: | |
-uuser_name -ppassword | |
-u user_name -ppassword |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install phpmyadmin | |
This is a : no need to think setup for Ubuntu 16.04 with php7-fpm already installed. | |
Then copy paste just before the last } of the file the following block into /etc/nginx/sites-avaliable/default | |
location /phpmyadmin { | |
root /usr/share/; | |
index index.php index.html index.htm; |