Setting up FTP on IIS




Issues
I'm a month too late to the party, but I just had the same problem and have a resolution for you.

First problem:

530 Valid hostname is expected.

IIS is a royal pain in the ass.

When you apply a binding to the FTP site you must also specify it in the ftp client when you login. So if your binding was configured as ftp.carsgozoom.com then your login should be ftp.carsgozoom.com|administrator.

Second problem:

530 User cannot log in, home directory inaccessible.

IIS is still a pain in the ass.

You're logged in but it doesn't know where to go. Well, it does know where to go but the directory doesn't exist. In your FTP root create a directory called LocalUser and put your username in there (FTProot/LocalUser/Administrator).

I hope this helps someone.

ASP.NET - Optimized Paging

Stored Procedure No 1
USE [AdhocReportsDB_WEL]
GO
/****** Object:  StoredProcedure [dbo].[spGetAllPatients]    Script Date: 10/09/2017 11:14:57 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        
-- Create date:
-- Description:    
-- =============================================
ALTER PROCEDURE [dbo].[spGetAllPatients]
    (
    @startIndex        int,
    @pageSize        int,
    @sortBy        nvarchar(30),
    @totalPatients int OUTPUT      
    )
AS
    SET NOCOUNT ON

 DECLARE
    @sqlStatement nvarchar(max),  
    @upperBound int

  IF @startIndex  < 1 SET @startIndex = 1
  IF @pageSize < 1 SET @pageSize = 1
 
  SET @upperBound = @startIndex + @pageSize


 Select @totalPatients=Count(*) From Patient
 
  SET @sqlStatement = ' SELECT P.Pat_ID, P.Pat_Secondary_Identifier, P.Pat_Forename1, P.Pat_Surname, P.Pat_Sex_Code,P.Pat_DOB
                FROM (
                      SELECT  ROW_NUMBER() OVER(ORDER BY ' + @sortBy + ') AS rowNumber, *
                      FROM    Patient
                     ) AS P
                WHERE  rowNumber >= ' + CONVERT(varchar(9), @startIndex) + ' AND
                       rowNumber <  ' + CONVERT(varchar(9), @upperBound)
  exec (@sqlStatement)

ASP.NET - Date Picker - Implement jQuery DatePicker Plugin with ASP.Net TextBox Control



  

   
   
   
   
   


   

   
            onclick="btnSubmit_Click" />
   



-->

Reference
https://www.aspsnippets.com/Articles/Implement-jQuery-DatePicker-Plugin-with-ASPNet-TextBox-Control.aspx

How to identify the Cipher used by an HTTPS Connection

Instructions

Using a browser to open an HTTPS page and check the certificate properties to find the type of Cipher used to encrypt the connection.

How to find the Cipher in Internet Explorer

  1. Launch Internet Explorer.
  2. Enter the URL you wish to check in the browser.
  3. Right-click the page or select the Page drop-down menu, and select Properties. 
  4. In the new window, look for the Connection section. This will describe the version of TLS or SSL used.

How to find the Cipher in Chrome

  1. Launch Chrome.
  2. Enter the URL you wish to check in the browser.
  3. In the address bar, click the icon to the left of the URL.
  4. Look for the line "The connection uses...". This will describe the version of TLS or SSL used.

How to find the Cipher in FireFox

  1. Launch FireFox.
  2. Enter the URL you wish to check in the browser.
  3. In the address bar, click the icon to the left of the URL.
  4. Now click on More Information.
  5. Select the Security tab.
  6. Look for the Technical details section. This will describe the version of TLS or SSL used.

If you are interested in HTTPS ciphers, you should be monitoring your web server. GSX Monitor will carefully observe the processes and services of your IIS and Windows servers to prevent potential issues from arising.
Why not sign up for a free trial?

Opensource - Cyber cafe Management Software

http://www.cybercafepro.com/

System Features
Windows 2000, XP, Vista, Windows 7, Windows 8 (32 & 64-bit) Compatible
Multi-Lanaguage Capability
Easy Setup Wizard
Client Application Launch Pad
24/7 Online Reporting
Auto-Updater (MCS & Clients)
Auto-Connect of Clients to Server (Working LAN Required)
Client Settings Import & Export
Employee Control Features...
Employee Tracking (Anti-Theft)
Employee Templates (Manager, Part-Time etc.)
Employee Point-by-Point Permissions (Over 60 Options)
Employee Permission Cloning
Employee Time Clock
Pricing Setup...
Pre-Paid Pricing Structures (Accounts & Timecodes)
Full Customer Information Profiles (Accounts Only)
No Charge Options (Telecentres & Schools)
Single or Multiple Computer Pricing Groups
Scheduled Pricing (Map pricing by day or hours)
Discount Management
Manual Timers (Xbox, Pool Tables, Laptops)
Full-Featured Point-of-Sale...
Full-Featured Point-of-Sale (320 Buttons)
Touch Screen Sized Point-of-Sale (POS) Item buttons
Tax Set Up (Up to 3 different taxes)
Local Currency (Any Windows Currency Symbol)
Inventory System
Customer Order System
Table Tabs (Non-Computer Table Billing)
Printer Monitoring
Multiple Printer Pricing
Bandwidth Monitoring
Sales and Event Logs
Data Exports (4 formats: xls, csv, xml, pdf)
Automated Database Backups
Computer Reservations System
Cash Drawer Configuration
Barcode Scanner Configurations (Accounts & POS)
Gaming Center Features...
CD-Key Management
Gaming Profile Management
ESRB Rating Restrictions
Customer Key Distribution
WOL Network Card Compatible
Touch Screen Friendly
Receipt Printer Configuration
Barcode Scanner Integration
Scrolling Announcement Marquee
Customer Control & Communication Features ...
Enable/Disable Internet Access
Enable/Disable Windows Desktop
Client End Sessions, Shutdowns, Reboots (from Server)
Transfer Client Sessions
Client Volume Controls (from Server)
Server / Client Chat
Protect Your Business (Security)...
Drive Access Blocking (ex. C: )
Windows Title Blocking (ex. XXX, porn)
Disable Client Downloads
Disable Client Hot-Keys
Disable Client Control Panel
Disable Client Windows System Features
MSN Messenger Security
Clear URL History at End-Session
Disable New Files.., File Open.., Save As..
Custom Client Side Help Text
Password Protected Client Admin Screen

Network share between two different OS(Windows 7 + Windows 8)

Press windows+r then type ncpa.cpl pick the network you want to connect to, then pick ipv4, then click properties, then click advanced, then down the bottom untick automatic metric and type in the box below 1. Do this for both computers. 


Press "~" then type "connect 1" (without quotation marks)


Installing Shiny Reporting Server


Step 1: Sign up to DigitalOcean


Go to DigitalOcean (use this referral link to get 2 months!) and sign up. Registration is quick and painless, but I think in order to verify your account (and to get your $10) you have to provide credit card details. If you go to your Billing page hopefully you will see the $10 credit.
Step 2: Create a new droplet


Now let’s claim one of DO’s machines as our own! It’s so simple that you definitely don’t need my instructions, just click on the big “Create Droplet” button and choose your settings. I chose the smallest/weakest machine ($5/month plan) and it’s good enough for me. I also chose San Francisco because it’s the closest to me, though it really wouldn’t make much of a noticeable difference where the server is located. For OS, I chose to go with the default Ubuntu 14.04 x64. I highly recommend you add an SSH key at the last step if you know how to do that. If not, either read up on it here or just proceed without an SSH key.


Note: all subsequent steps assume that you are also using the weakest server possible with Ubuntu 14.04 x64. If you chose different settings, the general instructions will still apply but some of the specific commands/URLs might need to change.


Even though you probably don’t need it, here’s a short GIF showing me creating a new droplet:
Step 3: Log in to your very own shiny new server


Once the droplet is ready (can take a few minutes), you’ll be redirected to a page that shows you information about the new droplet, including its IP. From now on, I’ll use the random IP address 123.456.1.2 for the rest of this post, but remember to always substitute your actual droplet’s IP with this one.


One option to log into your droplet is through the “Access” tab on the page you were redirected to, but it’s slow and ugly, so I prefer logging in on my own machine. If you’re on a unix machine, you can just use ssh 123.456.1.2. I’m on Windows, so I use PuTTY to SSH (“login”) into other machines. Use the IP that you see on the page, with the username root. If you used an SSH key then you don’t need to provide a password; otherwise, a password was sent to your email.


You should be greeted with a welcome message and some stats about the server that look like this:



Step 4: Ensure you don’t shoot yourself in the foot


The first thing I like to do is add a non-root user so that we won’t accidentally do something stupid as “root”. Let’s add a user named “dean” and give him admin power. You will be asked to give some information for this new user.
adduser dean gpasswd -a dean sudo



From now on I will generally log into this server as “dean” instead of “root”. If I’ll need to run any commands requiring admin abilities, I just have to prepend the command with sudo. Let’s say goodbye to “root” and switch to “dean”.
su - dean

Step 5: See your droplet in a browser


Right now if you try to visit http://123.456.1.2 in a browser, you’ll get a “webpage not available error”. Let’s make our private server serve a webpage there instead, as a nice visual reward for getting this far. Install nginx:
sudo apt-get update sudo apt-get -y install nginx



Now if you visit http://123.456.1.2, you should see a welcome message to nginx. Instant gratification!
Quick nginx references


The default file that is served is located at /usr/share/nginx/html/index.html, so if you want to change what that webpage is showing, just edit that file with sudo vim /usr/share/nginx/html/index.html. For example, I just put a bit of text redirecting to other places in my index page. The configuration file is located at /etc/nginx/nginx.conf.


When you edit an HTML file, you will be able to see the changes immediately when you refresh the page, but if you make configuration changes, you need to restart nginx. In the future, you can stop/start/restart nginx with
sudo service nginx stop sudo service nginx start sudo service nginx restart

Step 6: Install R


To ensure we get the most recent version of R, we need to first add trusty to our sources.list:
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'



Now add the public keys:
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 gpg -a --export E084DAB9 | sudo apt-key add -



Now we’re ready to install R
sudo apt-get update sudo apt-get -y install r-base



You should now be able to run R and hopefully be greeted with a message containing the latest R version.
R






Now you need to quit R (quit()) because there are a couple small things to adjust on the server so that R will work well.


If you also chose the weakest machine type like I did, many packages won’t be able to install because of not enough memory. We need to add 1G of swap space:
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 sudo /sbin/mkswap /var/swap.1 sudo /sbin/swapon /var/swap.1 sudo sh -c 'echo "/var/swap.1 swap swap defaults 0 0 " >> /etc/fstab'



Now installing most packages will work, but before installing any package, I always like having devtools available so that I can install GitHub packages. devtools will currently not be able to get installed because it has a few dependencies. Let’s install those dependencies:
sudo apt-get -y install libcurl4-gnutls-dev sudo apt-get -y install libxml2-dev sudo apt-get -y install libssl-dev



Ok, now we can start installing R packages, both from CRAN and from GitHub!
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\"" sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\""



Feel free to play around with R now.
Note 6.1: Important note re: installing R packages


Note that instead of launching R and installing the packages from R, I’m doing it from the terminal with sudo su - -c "R ...". Why? Because if you log into R and install packages, by default they will be installed in your personal library and will only be accessible to the current user (dean in this case). By running the command the way I do above, it installs the packages as the root user, which means the packages will be installed in a global library and will be available to all users.


As a demonstration, launch R (simply run R) and run .libPaths(). This will show you all the locations where R will search for a package, and the first one is where a new package will get installed. You’ll probably notice that the first entry, where packages will get installed, is a path under the current user’s home (for me it’s /home/dean/R/x86_64-pc-linux-gnu-library/3.2). From now on, whenever you want to install a package for the whole system, you should either log in as root and intall the package, or use the above command. To install an R package for just one user, it’s ok to proceed as normal and just install the package when you’re logged in as the intended user.
Step 7: Install RStudio Server


Great, R is working, but RStudio has become such an integral part of our lives that we can’t do any R without it!


Let’s install some pre-requisites:
sudo apt-get -y install libapparmor1 gdebi-core



Download the latest RStudio Server - consult RStudio Downloads page to get the URL for the latest version. Then install the file you downloaded. These next two lines are using the latest version as of writing this post.
wget https://download2.rstudio.org/rstudio-server-0.99.896-amd64.deb sudo gdebi rstudio-server-0.99.896-amd64.deb



Done! By default, RStudio uses port 8787, so to access RStudio go to http://123.456.1.2:8787 and you should be greeted with an RStudio login page. (If you forgot what your droplet’s IP is, you can find out by running hostname -I)





You can log in to RStudio with any user/password that are available on the droplet. For example, I would log in with username dean and my password. If you want to let your friend Joe have access to your RStudio, you can create a new user for them with adduser joe.


Go ahead and play around in R a bit, to make sure it works fine. I usually like to try out a ggplot2 function, to ensure that graphics are working properly.
Step 8: Install Shiny Server


You can safely skip this step if you don’t use shiny and aren’t interested in being able to host Shiny apps yourself. But don’t forget that Shiny Server can also be used to host Rmarkdown files, not just shiny apps. This means that even if you don’t develop shiny apps you might still have a use for Shiny Server if you want to host interactive Rmarkdown documents.


To install Shiny Server, first install the shiny package:
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""



(Note again that we’re installing shiny in a way that will make it available to all users, as I explained above).


Just like when we installed RStudio, again we need to get the URL of the latest Shiny Server from the Shiny Server downloads page, download the file, and then install it. These are the two commands using the version that is most up-to-date right now:
wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.4.2.786-amd64.deb sudo gdebi shiny-server-1.4.2.786-amd64.deb



Shiny Server is now installed and running. Assuming there were no problems, if you go to http://123.456.1.2:3838/ you should see Shiny Server’s default homepage, which includes some instructions and two Shiny apps:





If you see an error on the bottom Shiny app, it’s probably because you don’t have the rmarkdown R package installed (the instructions on the default Shiny Server page mention this). After installing rmarkdown in R, the bottom Shiny app should work as well. Don’t forget to install rmarkdown so that it will be available to all users as described above. I suggest you read through the instructions page at http://123.456.1.2:3838/.
Quick Shiny Server references:
Shiny Server log is at /var/log/shiny-server.log.
The default Shiny Server homepage you’re seeing is located at /srv/shiny-server/index.html - you can edit it or remove it.
Any Shiny app directory that you place under /srv/shiny-server/ will be served as a Shiny app. For example, there is a default app at /srv/shiny-server/sample-apps/hello/, which means you can run the app by going to http://123.456.1.2:3838/sample-apps/hello/.
The config file for Shiny Server is at /etc/shiny-server/shiny-server.conf.
To reload the server after editing the config, use sudo reload shiny-server.
When hosting an Rmarkdown file, name the file index.rmd and add runtime: shinyto the document’s frontmatter.


Important! If you look in the config file, you will see that by default, apps are ran as user “shiny”. It’s important to understand which user is running an app because things like file permissions and personal R libraries will be different for each user and it might cause you some headaches until you realize it’s because the app should not be run as “shiny”. Just keep that in mind.


The fact that apps run as the user shiny means that any package required in a shiny app needs to be either in the global library or in shiny’s library. As I mentioned above, you might need to install R packages in a special way to make sure the shiny user can access them.
Step 8.1: Set up proper user permissions on Shiny Server


As I just mentioned, dealing with which user is running an app and user permissions can be a bit annoying. It took me a while to figure our how to set up the users in a way that works well for me, and this is the setup I came up with. I’m not saying it’s necessarily the most correct way to work, but it works for me. Feel free to do the same.


Currently, assuming you’re logged in as user dean, when you create a folder in the Shiny Server folder, dean will be considered the only owner of that folder and nobody else (except root) will be able to write files there. Why is this a problem? It means that if an app is trying to write a file to the filesystem, the app will crash because shiny user does not have those permissions. One option is to add run_as dean; to the shiny server config, but I don’t like that because then when I want to see which user is using up the server’s resources, I won’t be able to differentiate between a shiny app running under my name vs me running R code myself.


So my solution is to create a user group called shiny-apps and add both dean and shinyusers to it. Then I’ll make sure that the whole /srv/shiny-server folder has read+write permissions to the group. (Again, disclaimer: I’m not a sysadmin so I’m learning all this as I go. Don’t treat this as a work of god).
sudo groupadd shiny-apps sudo usermod -aG shiny-apps dean sudo usermod -aG shiny-apps shiny cd /srv/shiny-server sudo chown -R dean:shiny-apps . sudo chmod g+w . sudo chmod g+s .



Now both dean and shiny will have access to any new or existing files under /srv/shiny-server. I like it because now I can develop an app from my RStuio Server (logged in as dean), be able to run it through RStudio (as dean), and also be able to run it via my Shiny Server (as shiny).
Step 8.2: Populate Shiny Server with Shiny apps using a git repository


As mentioned above, any Shiny app you place under /srv/shiny-server/ will be automatically served as a Shiny app. But how do you get shiny apps into there in the first place? If you’re creating a new app, you can just log into your RStudio Server and develop your shiny app from there, and just save the app under /srv/shiny-server/.


But what if you want to bring into your server an app you already have on your machine? One option is to directly transfer files using something like FileZilla or the scp command. The moment a shiny app directory is transferred to your droplet, the corresponding app will be available to use on the web right away. Another approach is to use git. If you don’t know what git is, that’s outside the scope of this article, so either look it up and come back here or just use FileZilla :)


The main idea is to have the /srv/shiny-server/ folder be a git repository, so that you can push to this repository from your personal computer and whenever you do a git pull on your droplet, it will update and grab the new apps you added. That’s how I set up my own shiny server, you can take a look at my shiny server on GitHub and fork it if you’d like a good starting point.


The first step is to install git and make the /srv/shiny-server/ directory a git repository.
sudo apt-get -y install git cd /srv/shiny-server git init



Next we will create a GitHub repository, so go to GitHub and add a new repository named shiny-server.





Now we need to grab the URL of the repository from GitHub, so on the new page you were redirected to, click on “HTTPS” and then copy the URL to its right, as shown in the image below:





Now we need to make the connection between the git repository we made on our droplet and the one we just created, and then add all the files that are currently in /srv/shiny-server/ to this repository. Be sure to replace the URL in the first command with the URL that you copied from your repository.
git remote add origin git@github.com:daattali/shiny-server.git git add . git commit -m "Initial commit" git push -u origin master



If you now refresh the GitHub page, you should see the files that were added from the droplet.


Now that git is set up, you can add shiny apps to this repository (assuming you know basic git usage). Whenever you add a new shiny app or edit the index page or an existing app, you’ll need to do a git pull on your droplet to grab those changes and display them in your server. That’s it, it’s pretty convenient in my opinion.


As mentioned previously, Shiny Server can also be used as a great tool to host interactive Rmarkdown documents (not just shiny apps), so you can use this method to publish your rmarkdown files.
Note 8.3: Shiny Server Open Source vs Shiny Server Pro


In this tutorial we installed Shiny Server Open Source, which is a free offering of Shiny Server by RStudio. However, RStudio also provides Shiny Server Pro, which is not free but is a lot more powerful.


If you’re just an individual playing around with shiny and want to host some of your personal apps (like myself), then using the Open Source version is perfectly fine. But if you’re looking to use a shiny server in your company, or if you require some more features such as user authentication (login), scaling (supporting multiple users at the same time), and monitoring, then I highly suggest you take a look at at Shiny Server Pro. Most of you will be fine with the free version, but you can contact me if you want to discuss the advantages of using Pro.
Note 8.4: Hosting R Markdown (Rmd) documents on your Shiny Server


Shiny Server is useful not only for hosting Shiny applications, but also for hosting R markdown (Rmd) documents. These R markdown documents can either be regular plain R markdown docs, or interactive Rmarkdown documents.


If you place an Rmarkdown file with the exact name of index.Rmd in any folder under your shiny server, you can access it by going to that folder’s URL. For example, /srv/shiny-server/hello/index.Rmd would be accessible at http://123.456.1.2:3838/hello/. If your Rmd document has any other name then you will need to specify the exact path to it - for example, /srv/shiny-server/hello/world.Rmd would be shown at http://123.456.1.2:3838/hello/world.Rmd.
Step 9: Make pretty URLs for RStudio Server and Shiny Server


This is optional and a little more advanced. You might have noticed that to access both RStudio and Shiny Server, you have to remember weird port numbers (:8787 and :3838). Not only is it hard and ugly to remember, but some workplace environments often block access to those ports, which means that many people/places won’t be able to access these pages. The solution is to use a reverse proxy, so that nginx will listen on port 80 (default HTTP port) at the URL /shiny and will internally redirect that to port 3838. Same for RStudio - we can have nginx listen at /rstudio and redirect it to port 8787. This is why my Shiny apps can be reached at daattali.com/shiny/ which is an easy URL to type, but also at daattali.com:3838.


You need to edit the nginx config file /etc/nginx/sites-enabled/default:
sudo vim /etc/nginx/sites-enabled/default



(I’m assuming you know how to use vim. If not, then just Google for “how to edit a file on linux”. In short: press I to start typing text, then press Esc to stop typing text, then press :wq followed by Enter to save the file).


Add the following lines right after the line that reads server_name localhost;:
location /shiny/ { proxy_pass http://127.0.0.1:3838/; } location /rstudio/ { proxy_pass http://127.0.0.1:8787/; }



Since we changed the nginx config, we need to restart nginx for it to take effect.
sudo service nginx restart



Now you should be able to go to http://123.456.1.2/shiny/ or http://123.456.1.2/rstudio/. Much better!


Bonus for advanced users: The above setup should be just fine for most users, but I did notice a few small issues with RStudio that seem to be fixed by allowing nginx to proxy WebSockets. For example, I noticed that when using the ggvis package in my RStudio, tooltips were not working. The fix is to add the following three lines inside the location /rstudio/ settings (keep the proxy_pass line and just add these three, and remember you have to restart nginx after changing the settings):
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";



If you’re hosting a Shiny Server, add these 3 lines after the proxy_pass line inside location /shiny/ as well.


Make your Shiny apps work with and without trailing slashes: If you have a Shiny app called “myapp”, then you would have to go to the URL http://123.456.1.2/shiny/myapp/to see it. But if you omit the trailing slash (http://123.456.1.2/shiny/myapp), it will not work. I figured out a way to solve this, but again, keep in mind that I’m an nginx noob so it might not be a good solution. I added the following line inside location /shiny/ (just after the previous 3 lines from the previous paragraph):
rewrite ^(/shiny/[^/]+)$ $1/ permanent;

Step 10: Custom domain name


If you have a custom domain that you want to host your droplet on, that’s not too hard to set up. For example, my main droplet’s IP is 198.199.117.12, but I also purchased the domain daattali.com so that it would be able to host my droplet with a much simpler URL.


There are two main steps involved: you need to configure your domain on DO, and to change your domain servers from your registrar to point to DO.
Configure your domain


In the DO website, click on “DNS” at the top, and then we want to add a domain. Select your droplet from the appropriate input box, and put in your domain name in the URL field. Do not add “www” to the beginning of your domain. Then click on “Create Domain”.


You will now get to a page where you can enter more details.
The “A” row should have @ in the first box and the droplet’s IP in the second box.
In the three “NS” fields, you should have the values ns1.digitalocean.com., ns2.digitalocean.com., ns3.digitalocean.com.
You also need to add a “CNAME” record, so click on “Add Record”, choose “CNAME”, enter www in the first box, and your domain’s name in the second box. You need to append a dot (.) to the end of the domain name.


Here is what my domain settings look like, make sure yours look similar (note the dot suffix on all the domain names):



Change your domain servers to DigitalOcean


You also need to configure your domain registrar by adding the 3 nameservers ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com. It’s fairly simple, but the exact instructions are different based on your registrar, so here is a guide with all the common registrars and how to do this step with each of them.


I use Namecheap, so this is what my domain configuration needs to look like:


And that’s it! Now you have a nicely configured private web server with your very own RStudio and Shiny Server, and you can do anything else you’d like on it.


If you’ve found this tutorial useful, please consider supporting me for the countless hours I’ve put into this tutorial :)


Updates


[2015-05-11] I’ve gotten several people asking me if this can be a solution for hosting rmarkdown files as well. YES it can! Shiny Server works great as hosting .Rmd files, and you can even embed a Shiny app inside the Rmd file. Here’s an example on my server in case you’re curious.


[2015-05-11] There is some inquiry about whether or not this setup should be “Dockerized” (What is Docker?). Docker is of course a great alternative to setting this up and can be even simpler by taking away all the pain of doing the setup yourself and providing you with a container that already has RStudio/Shiny Server installed. Dirk Eddelbuettel and Carl Boettiger already did a fantastic job of making some R-related docker containers, including RStudio and Shiny Server, so check out Rocker if you want to go that route. I think it’s nice to do all this installation yourself because it can look scary and intimidating before you do it the first time, and it can be a nice feeling to see that it’s actually very doable and really doesn’t take very long (less than half an hour) if you have a guide that takes away the annoying Googling at every step. But you can quickly surpass all these steps and use docker if you prefer :)


[2015-05-12] Added missing dependencies to install devtools and Important note re: installing R packages.


[2015-05-13] Added section about populating Shiny Server with Shiny apps using a git repository.


[2015-05-13] Added a bit in step 9 about proxying WebSockets to fix a few small potential issues with RStudio Server.


[2015-05-14] Added section about setting up proper user permissions on Shiny Server.


[2015-05-18] As mentioned in the comments, students with an educational GitHub account can get $100 credits through the GitHub Student Developer Pack.


[2015-09-01] Matthew Lincoln posted a script in the comments section that runs all the commands in this tutorial automatically when a DigitalOcean droplet is initialized. His exact comment: “I’ve tried my hand at getting most of this scripted into a cloud-config file that you can paste into the ‘User Data’ section when starting up a DO droplet… It doesn’t handle anything like custom user options (yet!), but I’ve found it a great way to automate a fair number of these steps.” I myself haven’t tried his script, but you can check it out here, and I also found a DigitalOcean tutorial about cloud-config and User Data here. Again, I haven’t tried it myself so if you have any questions, please direct it at Matthew :)


[2015-12-05] Added a small paragraph to step 9 for fixing Shiny app URLs that don’t have a trailing slash.


[2016-03-10] There was an article today about how to add authentication to Shiny Server using nginx. I haven’t tried it, but it looks like a great resource if you want to add authentication to your apps.


[2016-10-09] Added a small section on Shiny Server Pro.


[2017-04-04] Added a section on hosting Rmd files on a shiny server.

References
http://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/#user-libraries




LDAP Query - Filter Email accounts with Alias OR Multiple SMTP

Sample Query

(&(objectCategory=Person)(objectClass=user)(proxyaddresses=smtp:*EMAILADDRESS*))

For Fix Email
(&(objectCategory=Person)(objectClass=user)(mail=*EMAILADDRESS*))

Hiding a Page from Google Search

Remove URLs Tool

Temporarily block search results from sites that you own
The Remove URLs tool enables you to temporarily block pages from Google Search results on sites that you own. For sites that you don't own, see here.
To temporarily block a Search Console property page from Google Search:
  1. Open the Remove URLs tool.
  2. Click Temporarily hide.
  3. Enter the relative path of the desired image, page, or directory. The following rules apply:
    • The URL is case-sensitive. example.com/MyPage is not the same as example.com/mypage
    • Don't include anchors (page#anchor) in your URL; anchors are ignored.
    • The path is relative to your Search Console property root, and should include a leading / mark.
    • When hiding a single page, the URL must match exactly, including the page extension (for example, .html). Therefore, if you block path/mypage, then the following URLs will NOT be blocked: path/MyPage, path/mypage?1234, path/mypage.html.
    • All variations of http and https, www and non-www will match. So "example.com/mypage" will match https://example.com/mypage, http://example.com/mypage, https://www.example.com/mypage, and http://www.example.com/mypage.
    • If you choose to hide a directory, then any file or directory starting with the prefix you supply will be blocked. So if you enter /folder, then /folder/somefile, foldername/somefile, and /folder.html will all be blocked.
    • To hide an entire site, leave the path empty.
    • Try to use the URL exactly as it appears in Google Search results.
  4. Click Continue
  5. If not hiding the entire site, you'll be asked to choose one of the following actions:
    • Temporarily hide page from search results and remove from cache: Hides the page from Google search results for about 90 days, and also clears the cached copy of the page and snippet. The page can reappear in search results after the blackout period. Google will recrawl the page during the blackout period and refresh the page cache and snippet, but will not show them until the blackout period expires.
    • Remove page from cache only: Clears the cached page and snippet, but does not remove the page from search results. Google will refresh the page cache and snippet.
    • Temporarily hide directory: Hides an entire directory from search results for about 90 days and also clears cached pages and snippets for all pages in the specified directory. The directory can reappear in search results after the blackout period. Google will recrawl the pages during the blackout period and refresh the page caches and snippets.
  6. Click Submit Request. The request can take up to a day to process, but is not guaranteed to be accepted. Check back to see the status of the request. If your request has been denied, click Learn more to see the explanation. For example, your request might have failed because the URL you submitted didn’t meet the requirements for the type of blocking you requested, or you may need to make a different type of request in order to successfully block a specific URL.
  7. Submit additional removal requests for any pseudonym URLs for that page, as well as any variations in URL casing that your server handles. For example, all the following URLs might point to the same page:
    • example.com/mypage
    • example.com/MyPage
    • www.example.com/mypage
    • example.com/page?1234

Make removal permanent

The Remove URLs tool is only a temporary removal. To remove content or a URL from Google search permanently you must take one or more of the following additional actions:
  • Remove or update the actual content from your site (images, pages, directories) and make sure that your web server returns either a 404 (Not Found) or 410 (Gone) HTTP status code. Non-HTML files (like PDFs) should be completely removed from your server. (Learn more about HTTP status codes)
  • Block access to the content, for example by requiring a password.
  • Indicate that the page should not to be indexed using the noindex meta tag. This is less secure than the other methods.

Undoing a remove url request

If you need to cancel your 90-day block from search results, you can visit the status page of the tool and click Reincludenext to a successful request. Requests take a few days to be process.

Misusing the Remove URLs tool

The URL removal tool is intended as a first step for content that you urgently need blocked—for example, if it contains confidential data that was accidentally exposed. Using the tool for other purposes might cause problems for your site.
  • Do not use the tool to clean up cruft, like old pages that 404. If you recently changed your site and now have some outdated URLs in the index, Google's crawlers will see this as we recrawl your URLs, and those pages will naturally drop out of our search results. There's no need to request an urgent update.
  • Do not use the tool to address crawl errors from your Search Console account. The blocking tool blocks URLs from Google's search results, not from your Search Console account. You don’t need to manually remove URLs from this report; they will drop out naturally over time.
  • Do not use the tool to "start from scratch" with your site. If you're worried that your site might have a manual action, or you want to start with a clean slate after purchasing a domain from someone else, we recommend filing a reconsideration request letting us know what you're worried about and what has changed.
  • Do not use the tool to take your site "offline" after being hacked. If your site was hacked and you want to get rid of bad URLs that got indexed, use the URL blocking tool to block any new URLs that the hacker created—for example, http://www.example.com/buy-cheap-cialis-skq3w598.html. But we don't recommend blocking your entire site, or blocking URLs that you'll eventually want indexed. Instead, clean up the hacking and let us recrawl your site. More information about dealing with a hacked site.
  • Do not use the tool to get the right "version" of your site indexed. Many sites make the same HTML content or files available via different URLs. If you do this, and don’t want duplicates to appear in search results, review our recommended methods of canonicalization. Don’t use the URL tool to block the URLs you don’t want in search results. It won't keep your favorite version of a page; instead, could remove all versions (http/https and www/non-www) of a URL.
Reference
https://support.google.com/webmasters/answer/1663419?hl=en

SharePoint 2013 - Printing multiple documents from library

Follow the below steps:

Login to SharePoint Site – e.g. http://mysharepointsite.com in Internet explorer

Go to the library you want to print.

Click on Open with Explorer button on the Ribbon “Connect & Export”

Once opened in explorer, select the files to print, right click and hit print.

Why You Don’t Need to Run Manual Antivirus Scans (And When You Do)

Do you regularly open your antivirus program and run scans? Microsoft Security Essentials and other antivirus programs think you need to, warning you that your computer may be at risk if you haven’t done so in a while.
In reality, these manual scans aren’t all they’re cracked up to be. You can generally ignore your antivirus and it will do its job in the background without any help from you, only alerting you when it finds a problem.

Why Manual Antivirus Scans Are Unnecessary

Your antivirus is always running in the background. It’s monitoring the processes running on your system, ensuring that no malicious processes are running. Whenever you download a new file or open a program, your antivirus quickly steps in, examining the file and comparing it to viruses before allowing it to run. If you download a virus, your antivirus will notice without you needing to scan anything. For example, try downloading the EICAR test file — your antivirus will leap into action and deal with the file without any manual scans needed.
This feature is generally known as background scanning, real-time protection, resident protection, on-demand scanning, or something like that
In other words, you don’t need to run manual scans because your antivirus has already checked every file for malware as it arrived. It’s also aware of all the software running on your system. Your antivirus program doesn’t need you to click a button — it’s already doing the work.
Your antivirus probably already runs its own manual scans, anyway. Antiviruses generally run system scans in the background once a week without interrupting you.
Microsoft Security Essentials’ message is particularly silly. If MSE really thinks a manual scan is necessary, MSE has the ability to perform the scan in the background instead of scaring its users into clicking a button.
mse-scheduled-scan

When You Should Run Manual Scans

Manual scans are still useful in some cases, but you don’t need to regularly open your antivirus program and initiate them:
  • When You Install an Antivirus: When you first install an antivirus, it will perform a full-system scan immediately. This allows the antivirus to ensure your computer is in a clean state and that you don’t have viruses lurking in unopened files on your hard drive. After performing this scan, your antivirus can trust that your system is secure. However, it will still scan files for malware when you open them.
  • Check For Dormant Malware it Missed Earlier: Antiviruses use “definition files,” which are updated regularly. These files basically contain a catalogue of identified malware, and your antivirus compares programs you run to the catalogue to check whether they match. It’s possible that there’s a dormant virus lurking in an executable file deep on your hard drive that your antivirus missed during its first manual scan. If a virus definition has been added for that type a malware — or the antivirus’ heuristics have improved — it will only catch the dormant virus when you perform a manual scan. However, the virus will be caught if you try to run the file containing the virus or during a regularly scheduled full-system scan.
  • Get a Second Opinion: You should only have one antivirus program running at once, as multiple background-scanning antivirus programs can interfere with each other and cause problems with your computer. If you want to scan your computer with multiple antivirus programs, you’ll need to perform a manual scan with the second antivirus program instead of using its background-scanning feature.
mse-manual-quick-scan

Why Background Protection is Better Than Manual Scans

You can optionally disable background scanning in some antivirus programs and just perform manual scans, but you shouldn’t.
Think of your computer as your house, and your antivirus’s background scanning protection as a security guard standing at your front door and frisking everyone who tries to enter your house. A manual scan is the equivalent of having the security guard search every inch of your house for intruders.
If you’ve already checking everyone who enters your house, you don’t need to search every nook and cranny of your house for malicious people. In fact, it’s much better to guard your door because so you can catch threats before they’re allowed in — if you catch someone lurking in a dark corner of your house or PC, who knows what they’ve been doing in the time between when they were allowed in and when you caught them. Once the software is running on your computer, it also has the potential to hide itself and prevent the antivirus program — and even the Windows Task Manager — from seeing that it’s running. Software that does this is generally known as a rootkit.
You want to catch the malware before the virus starts running on (and infects) your computer, so stick with automatic background scanning instead of manual scans. Even if you scan every program you download manually before running it, you should use automatic scans to get maximum protection against zero-day attacks and other security threats.
microsoft-security-essentials-real-time-protection

Some security suites may remove cookies when you perform a manual scan, referring to them as “threats.” This is a great way for the security suite to pretend it’s doing something valuable and justify its price tag. But you don’t need a full security suite, anyway — and you can always have your browser automatically clear cookies if you want to get rid of them.

How to Install Windows 7 From USB

Chances are you'll need to install Windows 7 from a USB device if you have a tablet, or small laptop or netbook device, few of which include optical drives as standard hardware.
This means that you must get the Windows 7 setup files onto a flash drive (or any USB based storage) and then boot from that flash drive to get the Windows 7 installation process started.
However, simply copying the files from your Windows 7 DVD to a flash drive won't work.
You have to specially prepare the USB device and then properly copy the Windows 7 install files to it before it'll work as you expect.
You're in a similar, but slightly easier to solve, situation if you've purchased a Windows 7 ISO file directly from Microsoft and need that on a flash drive.
No matter what situation you're in, just follow the instructions below to install Windows 7 from a USB device.
Note: The following tutorial applies equally to whatever edition of Windows 7 you have a disc or ISO image of: Windows 7 Ultimate, Professional, Home Premium, etc.
What You'll Need:
  • A Windows 7 ISO or DVD [See Where Can I Download Windows 7? for information on getting an ISO image, or buy a new Windows 7 DVD from NewEgg.]
  • A 4 GB (or larger) flash drive
  • Access to a computer with Windows 7, 8, 10, Vista, or XP installed and working properly, as well as with a DVD drive if you have a Windows 7 DVD

How to Install Windows 7 From USB

Correctly preparing a USB drive for use as an installation source for Windows 7 will take around 15 to 30 minutes depending on your computer speed and what edition of Windows 7 you have on DVD or in ISO format
Important: Start with Step 1 below if you have a Windows 7 DVD or Step 2 if you have a Windows 7 ISO image.
  1. Create an ISO file from the Windows 7 DVD. If you already know how to create ISO images, fantastic: do it, and then come back here for further instructions on what to do with it.

    If you've never created an ISO file from a disc before, check out the tutorial linked above. It'll walk you through installing some free software and then using it to create the ISO. An ISO image is a single file that perfectly represents a disc... in this case, your Windows 7 installation DVD.

    Next we're going to work on properly getting that Windows 7 ISO image you just created onto the flash drive.
  1. Download Microsoft's Windows 7 USB/DVD Download Tool. Once downloaded, execute the file and follow the installation wizard.

    This free program from Microsoft, which works in Windows 10Windows 8, Windows 7, Windows Vista, or Windows XP, will correctly format the USB drive and then copy the contents of your Windows 7 ISO file to the drive.
  2. Start the Windows 7 USB DVD Download Tool program, which is probably located in your Start menu or on your Start screen, as well as on your Desktop.
  3. On the Step 1 of 4: Choose ISO file screen, click Browse.
  4. Locate, and then select, your Windows 7 ISO file. Then click Open.

    Note: If you downloaded Windows 7 directly from Microsoft, check for the ISO image wherever you tend to store downloaded files. If you manually created an ISO file from your Windows 7 DVD in Step 1 above then it will be wherever you saved it to.
  5. Click Open.
  6. Click Next once you're back on the Step 1 of 4 screen.
  7. Click USB device on the Step 2 of 4: Choose media type screen.
  8. On the Step 3 of 4: Insert USB device screen, choose the flash drive or external hard drive you want to put the Windows 7 installation files on.

    Tip: If you haven't yet plugged in the flash drive or other device you're using, you can do that now. Just click the blue refresh button to make it show up in the list.
  1. Click the Begin copying button.
  2. Click Erase USB Device if you're prompted to do so on a Not Enough Free Space window. Then click Yes to the confirmation in the next window.

    Note: If you don't see this it just means that the flash drive or external hard disk you've selected is already empty.

    Important: Any data you have on this USB drive will be erased as part of this process.
  3. On Step 4 of 4: Creating bootable USB device, wait for the Windows 7 USB DVD Download Tool to format the USB drive and then copy the Windows 7 installation files to it from the ISO image you provided.

    You'll see a Status of Formatting for several seconds, followed by Copying files. This part might take as long as 30 minutes, maybe even longer, depending on which edition of Windows 7 the ISO file you have is from, as well as on how fast your computer, USB drive, and USB connection is.

    Tip: The percentage complete indicator may sit on one or more percentages for a long time. This does not mean anything is wrong.
  1. The next screen you see should say Bootable USB device created successfully.

    You can now close the Windows 7 USB DVD Download Tool program. The USB drive can now be used to install Windows 7.
  2. Boot from the USB device to start the Windows 7 setup process.

    Tip: You might need to make changes to the boot order in BIOS if the Windows 7 setup process doesn't start when you try to boot from the USB drive. See How to Change the Boot Order in BIOS if you've never done that.

    Tip: If you still can't get the flash drive to boot, and you also have a UEFI based computer, see Tip #1 below for help.

    Note: If you arrived here from How to Clean Install Windows 7, you can now return to that tutorial and continue installing Windows 7. See How to Install Windows 7 if you weren't doing a clean install or you're not sure what kind of installation to do.

Tips & More Information

  1. When the Windows 7 USB DVD Download Tool formats the flash drive during the process above, it does so using NTFS, a file system that some UEFI systems won't boot from if on a USB stick.

    To get the USB drive to boot on these computers, you should copy the data from the flash drive onto a folder on your computer, then reformat the flash drive using the older FAT32 file system, and then copy that same data back onto the drive.
  2. See my How to Burn an ISO File to USB tutorial for an alternative method for getting a Windows 7 ISO image onto a USB drive. I much prefer the instructions I've outlined above, but if you have trouble getting it to work, the general ISO-to-USB walkthrough should do the trick.
  3. Having trouble installing Windows 7 from a flash drive or other USB device? See Get More Help for information about contacting me on social networks or via email, posting on tech support forums, and more.