Crontab – Linux

Here are some commands to be used to work with crontab in Linux sudo crontab -e Open to edit crontab crontab -l List all your crontab jobs * * * * * command to be executed – – – – – | | | | | | | | | —– Day of week (0 …


Crontab – Linux

Here are some commands to be used to work with crontab in Linux sudo crontab -e Open to edit crontab crontab -l List all your crontab jobs * * * * * command to be executed – – – – – | | | | | | | | | —– Day of week (0 …


Handy Docker commands

1. Remove all your containers and images, using following commands: docker kill $(docker ps -q) : Kill all running containers docker rm $(docker ps -a -q) : Delete all stopped containers after previous command docker rmi $(docker images -q) : Delete all images You may find following error: “Error response from daemon: conflict: unable to …


Xamarin Forms – check if phone is currently connected to Internet or not

Sometimes, you may need to check if your application has internet connection or not. In order to do so, you can use the plugin https://www.nuget.org/packages/Xam.Plugin.Connectivity/ and then using the following method: public async Task HasInternet() {     var canReach = await CrossConnectivity.Current.IsRemoteReachable(“google.com”);     return canReach; }


Print class name, method name for debugging purpose c#

– For normal purpose: Debug.WriteLine(this.GetType().Name + ” – ” + MethodBase.GetCurrentMethod() + ” – ” + e.Message + ” – ” + e.GetType()); – For catching an exception: Debug.WriteLine(this.GetType().Name + ” – ” + MethodBase.GetCurrentMethod() + ” – ” + e.Message + ” – ” + e.GetType()); Explaination: this.GetType().Name : will print the calling class.


c#

Remove Entry suggestion from Xaml file xamarin forms

jQuery handy commands

1- To count number of same class id var roleRowsCount = $(“div[class*=’roleRow’]”).length; 2- To get the index of a button when it is clicked (when we have a list of same button with same id) var index = $(‘.btn’).index(this);


Some packages to be installed for your .NET web services application

Here are some of my collections. Install-Package Microsoft.AspNet.Web.Optimization Install-Package Microsoft.AspNet.Mvc -Version 5.2.3.0 Install-Package Microsoft.AspNet.WebApi.Core -version 5.2.3 Install-Package Microsoft.AspNet.WebApi.WebHost Install-Package EntityFramework


Enable localhost on windows and access from mobile in same LAN

In oder to configure your Windows to let your other devices access, you will need to do following steps: 1- Start -> Search -> cmd 2- Type “ipconfig” Look for your PC address. If you are using Wifi, then: Under Wireless LAN adapter Connections wireless network, take note this: IPv4 Address……: 192.168.x.x 3- Open “Windows …


App4Autism – How to use Normal Activity – Scheduler

This article is to support App4Autism users to use Normal Activity inside the application. App4Autism is an amazing tool for parents to teach and educate their autism kids. Download: https://play.google.com/store/apps/details?id=vn.tientham.visualsupportforautism 1- With normal activity, you can add maximum 10 activities for a day (10 is a value required by psychologist). To add activity, you can …


Apache2 server administration – Handy guide

1- To restrict access to a port from certain ip address root@docker-adb-01:~# cat /etc/apache2/sites-enabled/000-default.conf ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined < Directory /var/www/html/> Order Deny,Allow Deny from all Allow from your_ip_address_1 Allow from your_ip_address_2 < /Directory> < /VirtualHost> Then, you will only allow your ip addresses to access to your apache server …