Wednesday 22 May 2019

Bitnami - For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

  1. login into your server using ssh or from lightsail ssh
  2. get default password
  • Username: root(it’s default)
  • Password: MnQERJ8dwswsdgcHkQ(Like this) .Connect to Bitnami Lightsail through SSH on Lightsail Dashboard to access the command line tool. Using cat bitnami_application_passwordto get the password, this is the same with the password you access to Wordpress (based on Lightsail) in the first time.
3. ### Modify the configuration file
Goto /opt/bitnami/apps/phpmyadmin/conffile
sudo nano/opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf
changes are =
(a).
#Allow from 127.0.0.1
 Allow from all
(b).
#Require local
 Require all granted
------------------------------somthing like this------------------
<IfVersion < 2.3 >
 Order allow,deny
#Allow from 127.0.0.1
 Allow from all
 Satisfy all
</IfVersion>
<IfVersion >= 2.3>
#Require local
 Require all granted
</IfVersion>
4. ### Restart of apache
sudo /opt/bitnami/ctlscript.sh restart apache
5. ### Browsing
http://hostname/phpmyadmin/

## Caution

For security reasons, phpMyAdmin are accessible only when using 127.0.0.1 as the hostname.

Flutter — Command /bin/sh failed with exit code 255 , Unable to load Asset  , No address associated with hostname



Flutter — iOS: Command /bin/sh failed with exit code 255


goto ios folder run below commands:
flutter clean
flutter build ios






SocketException: Failed host lookup: ‘node1.bitcoiin.com’ (OS Error: No address associated with hostname, errno = 7)


1.

Make sure you are online, you are connected to internet whether it is mobile or emulator

2.

make sure you have given internet permission in your app's android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" /> 




Unable to load Asset — wrong indentation in pubspec.yaml


Spaces are significant in YAML

assets is indented too far
flutter:
 uses-material-design: true
 assets:
 — images/default.png
 — images/cat.jpg

MongoDB - ParallelSaveError: Can’t save() the same doc multiple times in parallel




ParallelSaveError: Can’t save() the same doc multiple times in parallel




I was working on nodejs application suddenly application crashed and written in console, Can’t save() the same doc multiple times in parallel
than i review my code i got one mistake

exists.save();
exists.save().then((data:any)=>{
}).catch((error:any)=>{
})




IPC vs RPC

IPC vs RPC

  • Remote Procedure Call (calling methods remotely at a system)
  • Interprocess Communication (method enabling processes in the same system to interact).
  • RPC — Remote Procedure Call — is a particular type of communication, but can be on a single machine, or across a network between machines. http://en.wikipedia.org/wiki/Remote_procedure_call
  • IPC — Inter-Process Communication — is a general term for communication between different processes (which are usually on a single machine). http://en.wikipedia.org/wiki/Inter-process_communication

Blockchain - Bitcoin Configuration File (bitcoin.conf)



Bitcoin Configuration File (bitcoin.conf)

This is an example of bitcoin.conf file

#The Same File Can Be Used As BitcoinCash Configuration File
#Use WalletNotify Option To Get Notifications

## bitcoin.conf configuration file
## JSON-RPC options (for controlling a running bitcoin-qt/bitcoind process)
# Bitcoin to accept JSON-RPC commands.
server=1
# How many seconds bitcoin will wait for a complete RPC HTTP request
rpctimeout=30
# Listen for RPC connections on this TCP port:
rpcport=2376
# You can use bitcoind to send commands to bitcoin-qt/bitcoind
rpcconnect=
# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
#rpcssl=1
# Run on the test network instead of the real bitcoin network.
#testnet=1       
# Do not use Internet Relay Chat to find peers.
noirc=0
# Maximum number of inbound+outbound connections.
#maxconnections=125
# Minimize to the system tray
minimizetotray=0
rpcworkqueue=1000
#use walletnotify option if you want to get transaction hash
#walletnotify= sha.sh

Use WalletNotify Option To Get Notification

walletnotifywill execute every time you either
  • receive bitcoin
  • send bitcoin
  • when a bitcoin gets its first confirmation

bitcoin.conf file location
Ubuntu : /home/<username>/.bitcoin/bitcoin.conf
Windows XP C:\Documents and Settings\<username>\Application Data\Bitcoin\bitcoin.conf
Windows Vista, 7, 10C:\Users\<username>\AppData\Roaming\Bitcoin
Linux /home/<username>/.bitcoin/bitcoin.conf
Mac OSX /Users/<username>/Library/Application Support/Bitcoin/bitcoin.conf
For testnet
testnet=1


Sunday 19 May 2019

Wordpress - Install WordPress on Ubuntu


1. Install Lamp Server

(a) Install tasksel


(b) Install lamp using tasksel
sudo tasksel install lamp-server

(c) Check php version

php -v

   (d) Check mysql version
mysql -v


   (e) Check mysql version
apache2 -v


9. PHP Configuration


(a) Create info.php file

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

(b) Open info.php page on browser
http://your-ip-address/info.php or https://your-domain/info.php

    (c) Install phpmyadmin
sudo apt install phpmyadmin


    (d) Edit phpMyAdmin’s Apache Config
 If the PhpMyAdmin package has not been enable to work with apache web server automatically, run the following commands to copy the phpmyadmin apache configuration file located under /etc/phpmyadmin/ to apache webserver available configurations directory /etc/apache2/conf-available/ and then activate it using the a2enconf utility, and restart apache service effect the recent changes, as follows.

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf

(e) Open phpmyadmin
http://your-ip-address/phpmyadmin or https://your-domain/phpmyadmin

11. Mysql configuration

(a) Create root password for mysql where default user is root
sudo mysql_secure_installation

      (b) Root login into mysql

      (c) Create new database
CREATE DATABASE your-db-name


      (d) Create new user
GRANT ALL PRIVILEGES ON your-db-name.* TO 'your-user-name'@'localhost' -> IDENTIFIED BY 'your-password';


      (e)  FLUSH PRIVILEGES;
(f) exit;

12. Wordpress setup

       (a) Install wordpress
sudo apt install wordpress


       (b) Create new configuration  file

Open /etc/apache2/sites-available/wordpress.conf and write the following lines:
#....................................................................................
#Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /usr/share/wordpress/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
#....................................................................................

(c) Enable this new configuration file with
a2ensite utility

(d) Restart the apache2 web server

(e) Now configure WordPress to use a mysql database.

Open /etc/wordpress/config-localhost.php file and write the following lines:

sudo nano /etc/wordpress/config-localhost.php
#...................................................................................
<?php
define('DB_NAME', 'your-db-name');
define('DB_USER', 'your-user-name');
define('DB_PASSWORD', 'your-password');
define('DB_HOST', 'localhost');
define('WP_CONTENT_DIR', '/usr/share/wordpress/wp-content');
?>
#...................................................................................

(f) cd /etc/wordpress/
(g) sudo cp config-localhost.php config-yourip.php
(h) sudo service apache2 restart

Bitnami - For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname. login into your server using ssh or from ...