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 update | |
sudo apt-get install nodejs | |
sudo apt-get install npm | |
## Use n module from npm in order to upgrade node | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable |
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
# Taxonomy terms: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php | |
# Menu links: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php | |
# File items: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php | |
# Nodes: |
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
MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting. | |
sudo apt-get install mycli | |
Used examples: | |
$ mycli local_database | |
$ mycli -h localhost -u root |
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; |
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
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 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
//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
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
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; |