Backup Your PC and Work With Your Files Using Google Backup and Sync and Google Drive File Stream

Google Drive is a great tool.  It allows us to collaborate, share, and store our files “in the cloud”.  It has completely changed the way I manage my files.  One of the huge benefits of Google Drive is that you can leverage it to store backups of your important files.  Until recently, that was done with the Google Drive Sync application.  The old Google Drive Sync was a powerful tool, but it had some downsides.

  1. It would pull down local copies of everything in your Google Drive.  While having things in two places is a good strategy, I have hundreds of gigabytes of data that I keep in my Drive that I don’t need on a daily basis.  Keeping a copy of this data on local storage was a waste.  You could specify in the client which folders to sync, but as soon as you stopped syncing all folders, folders you created moving forward required you to remember to go into the client and check a box to sync them.
  2. Folders where important files are commonly located on your computer (like your documents, desktop, and pictures) were not synced by default.  You could get around this by moving the target of these folders to a subfolder in your Google Drive, but this process was not intuitive for the average user and always felt like you were tricking Google Drive to sync your stuff.

Fortunately, these problems have been solved using two new(ish) tools from Google.

  1. Backup and Sync – this product is the replacement for the old Google Drive Sync application discussed above.  It separates the “backup” function from the “sync” function.  What most end users really need is the “backup” function.  Most of us can skip the “sync” function because of….
  2. Google Drive File Stream – this product will map a network drive (just like a file share on a server) that represents to your Google Drive.  This allows you easy access to all your files in Drive, without creating a local copy.  The files are navigated and opened  through your file system (just like your other local files).  For example, let’s say you have a native Photoshop file stored in Google Drive.  You can locate that file through the mapped drive that represents your Google Drive, then open it directly in Photoshop.  The file is streamed for use on your computer.  You make your changes, save the file, and those changes are saved directly to the file in your Drive.  No downloading, no uploading, no syncing.  The interaction with Google Drive is almost completely transparent to the user.  You can even access files stored in your Team Drives this way!

With these two applications, you can easily backup the important files on your computer and access all your important files “in the cloud”.  In the video above, I’ll show you how I set these programs using a PC, but there are also Mac clients available.  I’ve provided links to the installers from the video below.

Note: It is important to note that Google Drive File Stream only works with “G Suite” accounts (Like Google Apps for Education or Google Apps for Work).  Google Drive File Stream does not work with individual Google accounts at the time of this article.

Links:

If you have any questions about these products, please leave me a comment below.

Mass Data Entry into Web Forms Using Google Apps Script

Recently I was presented with a scenario where a large amount of data that was stored in a spreadsheet needed to be entered into a system with no mass upload feature.  Since the alternative was having someone wear the paint of their keyboard copying and pasting, I needed to automate it.

Most systems provide a way to do this via the uploading of a CSV file.  Some small niche products either lack this feature or require the user to pay for the provider to add the data on the back end.  This system, which shall remain nameless, had this issue.  Here is the interface I was working with:

interface

I have hundreds of names that need to be entered for each year, going back several years.  There were two problems I needed to solve.

Problem #1 – There are only 10 fields to enter data into.

Problem #1 is really easy to fix using the iMacros for Chrome extension.  iMacros allows you to record and play back interactions with a web browser (like clicking a button several times).  Here are the steps I used to get the number of text boxes I needed.

  1. Install the iMacros for Chrome extension.
  2. Go to the page that contains the web interface you need to interact with.
  3. Click the iMacros extension icon to open the interface.
  4. Click Record then Record Macro.
  5. Click the button in the web interface that you would rather not repetitively press (in my case, the “Add More Name” button).
  6. Click Stop.
  7. The iMacros editor will open.  You should have 3 lines of code.
    1. Line 1 is version information, ignore it.
    2. Line 2 tells the web browser to go to the page you are on.  Since we are going to loop this code, we don’t want it opening the web page every time.  To prevent that, simply delete this line.
    3. Line 3 is what “clicks” the button.
  8. Once you have removed line 2, click the Save & Close button.
  9. With the web interface of the system you are using, select #Current.iim (the default macro you just created) in the left column.
  10. Click Play Macro.  This should perform the click, and the result should be displayed (in my case, 2 input boxes are added).
  11. I want to add 100 more boxes however.  Because each click adds two boxes, I’ll need to run this macro 50 times.  Under “Play macro repeatedly”, change “Max” to “50” and press Play Loop.  The macro should run 50 times, and the desired result should be shown in the web interface.

Here is a short video of this in action:

Problem #2 – Get the information from the spreadsheet into the web form.

Here is what my spreadsheet looks like:

googlesheet

I have all the names I want to enter in column ‘A’ of a Google Sheet – all I need to do is automate their entry into all the fields I generated above.  The way I chose to do this is with a keyboard emulator.  I often use keyboard emulators to perform repetitive tasks – they allow you to write code that emulates the pressing of keys on your keyboard.  One example is a physical keyboard emulator I use (USB Rubber Ducky) to automate the process of enrolling Chromebooks.

In this case, I am going to use a software emulator.  WinKeySim is the emulator I chose for this project, there are several other freeware versions available.

In order for this to work, we need to create the list of commands to put into WinKeySim.  Based on WinKeySim’s syntax, the pseudo-code would look something like this:

1 open the command with ["
2 set x to 1
3 add the name from row x
4 if x != the last row
  wait for 200ms [!200] and send a [tab] to go to the next field
  x++
  repeat from 3
5 else this is the last row so close the command with "]

I won’t go over the intricacies Google Apps Script here.  I will tell you it is a very powerful tool, and if you use Google Apps and have a need to automate, it will prove very useful to you.  Based on my spreadsheet above, here is the code I used to build the command I used with WinKeySim.

function myFunction() {
 //get the active spreasheet
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 //get the sheet named 'Sheet1'
 var sheet = ss.getSheetByName("Sheet1");
 //get the row number of the last row
 var lastRow = sheet.getLastRow();
 
 //create a new google doc to store the emulator commands in
 var doc = DocumentApp.create('Honor Roll Students');
 var body = doc.getBody();
 var text = body.editAsText();
 
 //start the document with [" (syntax for WinKeySim)
 text.appendText('[\"');
 //loop through each row of the spreadsheet
 for(i=1;i<=lastRow;i++){
 //get the name in column A
 var name = sheet.getRange(i,1).getValue();
 //append the name to the sheet
 text.appendText(name);
 //if we are not at the last row, add a 200ms delay and
 //send a tab to change fields (syntax for WinKeySim)
 if(i !== lastRow){
 text.appendText('[!200][tab]');
 }
 }
 //if this is the last row, end the docuemnt with "]
 if(i !== lastRow){
 text.appendText('"]');
 }
}

When executed on the spreadsheet of names, this will spit out a new Google Doc into my Google Drive containing the emulator command I will use to input the data.  It will look something like this:

googledoc

I can then paste that command into WinKeySim and the data will be entered automatically.  Check out the video below to see it in action.

If you have any questions about this, please leave a comment below!

Prevent Windows Update from Automatically Rebooting Your Computer (Windows 7)

I recently had a user complain that their computer randomly restarted to do updates.  What likely happened is that they didn’t notice the popup warning them what was about to happen (as seen below).

reboot

Your computer needs to be rebooted after certain updates, but the way Microsoft goes about making that happen isn’t very user friendly.  If you are a person who shuts down or reboots your computer every day, I’d suggest revoking Windows Update’s ability to restart your computer.

WARNING_SMALLWarning – This procedure involves modifying group policy.  The procedure itself is quite simple, but you can cause some serious issues “playing around” with group policies if you don’t know what you are doing.  Proceed at your own risk!

  1. Click the start button, type “gpedit.msc” (into the search box), then hit the enter key on the keyboard.
  2. The “Local Group Policy Editor” should now be open.  Use the left column to navigate to Administrative Templates > Windows Components > Windows Update (as seen below).
    gpedit_step2
  3. Double-click the No auto-restart with logged on users for scheduled automatic updates installations item in the right column.
  4. Click the Enabled radio button then click Apply, then click OK (as seen below).
    gpedit_step4
  5. Close the “Local Group Policy Editor”

Your computer should no longer prompt you to reboot in order to apply updates.  The updates will still be applied the next time your computer is (re)booted, but you are no longer at the mercy of the “Postpone” button.  Free at last!

URL Shorteners: What, Why, and How?

url_shorteners

What are they?

In their most basic form, URL shorteners provide a simple web interface where the user can paste any cumbersome URL into a text box, click a button, and be returned a much shorter URL.  The user then can share the short URL with the intended audience.  Any users visiting the shortened URL will be redirected to the original URL.

For example: the URL for the Google Apps For Education Community on Google+ is: “https://plus.google.com/u/0/communities/101802680117484972712“.  I ran that URL through Google’s URL shortening service (goo.gl), and created the following shortened URL: “http://goo.gl/zDhkM“.  Anyone who clicks or types in that goo.gl link, will be redirected to the longer and messier original URL.

There are several websites that provide this service; a few of the more popular options are:

If you want more information on the concept of URL shortening, check out this Wikipedia article.  OK, on to the good stuff.

Why should you use them?

Are you providing a link on any printed material where a user would be expected to manually type the URL?  If so, a shortened link is often times easier to type.  Using a shortened URL is also less visually distracting, producing a smaller break in the flow of a paragraph.

star_smallTip: Provide a QR code as well for any printed links.  QR codes and smartphones are becoming increasingly popular and are the easiest way to connect the reader of your printer material to the intended online content.

Are you sharing on social media?  Using my example above, the full Google+ link is 61 characters in length, while the shortened version is only 19 characters.  Twitter only allows 140 characters per tweet; shorter link URLs mean more space for your accompanying message.

shortened_url_details

Do you want to track clicks?  Most URL shorteners keep a log of some basic information about those who clicked your link and can provide you with a report containing that data.

An example of this data (from goo.gl) is provided to the right (click to enlarge). Number of total clicks, a graph of clicks over time, browser and platform breakdown, even a breakdown by country of origin is provided.

How to use them?

While the overall feature set provided by these services are not identical, their core functionality is consistent.  For the purposes of this post, I’m going demonstrate the goo.gl  service.  I use goo.gl as my URL shortener of choice because I’m a Google Apps user; the goo.gl service can store information in my Google account without having to set up yet another account.  Check out the video below to see the goo.gl service in action.

But I want it to be even easier!

No problem.  If you are using Google Chrome as your browser of choice (if not maybe it is time to make the switch), go get the aptly named “goo.gl URL Shortener” extension from the Chrome Web Store.  Here is a direct link: http://goo.gl/GPNfL.  For a quick walk through, check out the following video:

Please leave any questions or comments below.

QR Codes for Beginners

QR Codes are everywhere these days.  You may not know what they are, but I’d bet you’ve seen them in one form of advertising or another.  They look like this:

blatti_net_qr

When scanned by a code reader app, this QR code will take you to my website.  As more and more technology becomes available to students, QR Codes can be a really handy tool for educators.  I’ve found that most teachers are aware of the existence of QR codes, however very few of them understand what they are, how they work, or how easily they can leverage their power.  In this post, I’ll show you just how easy it is to use QR codes to connect with your students.

What is a QR Code?

QR stands for “Quick Response”.  They are essentially 2D barcodes.  Originally designed to be used in the manufacturing industry, they have become popular with advertising firms to connect their potential customers to online content.  You’ll frequently see QR codes captioned with statements like “Scan to find out more…”.

For your purposes as an educator, what you need to know about them is very minimal.  When you see a QR code, essentially what has happened is that someone has used a utility to encode some (usually alphanumeric) data into an image using a common standard.  That image is a QR code.  In my example above, the text that is encoded in that image is “http://blatti.net”.

So how do you read them?

There are software applications available on smartphones and tablets, commonly known as “QR Code Readers”.  These applications essentially perform the opposite function of the encoding utility I mentioned in the previous section.  These applications can read the image using the camera on the device, decode the data using that same common standard, and return it to its original form.  There are many of these applications available for iOS and Android devices, just search the App or Play store (respectively).

As in my example above, QR codes are most commonly used to encode web addresses (URLs).  When a QR code containing a URL is scanned, QR code reading applications will direct the browser on the device they are scanned from to that URL.  Pretty simple right?

And how is that useful?

Today’s students are completely immersed in technology.  They are connected to their smartphones in a way that older generations sometimes find difficult to relate to.  By using QR codes to direct your students to websites, you are presenting them information in a way that is convenient and relevant to them.  QR codes work because they lower the barrier to entry.  They can be directed to exactly where you want them to go without typing a URL, then navigating to your “home page”, then clicking one of your links.

So how do I make one?

The beauty of this is how dead simple it is to implement. I’ve included a 1 minute video below that shows how I made the QR code above.  I use Google Chrome as my browser of choice.  One of the awesome features of Chrome is your ability to use apps form the Chrome Web Store.  I used the QR Creator application to make my code, however there are several options available for generating QR codes.  Happy coding!

Chromebook Serial Number

I recently saw a discussion involving a user who was trying to figure out how to determine the serial number of a chromebook when the sticker had been removed from the device. Unable to easily locate that procedure, I thought it would be a good idea to make a post to help others in this situation.  This process has only been tested on a Samsung 550 model.

If you aren’t familiar with developer mode, I’d suggest reading this article.  In most scenarios, all user data is stored in the cloud; erasing the stateful partition has no ramifications to the end user.  Please understand what you are doing by booting into developer mode before continuing with this process.

  1. Boot the device into developer mode (toggle the developer switch)
  2. At the chrome OS verification screen, press Ctrl+D (this will wipe the stateful partition)
  3. The device will erase and reboot
  4. Once again, press Ctrl+D at the chrome OS verification screen
  5. At the select language screen, press Ctrl+Alt+→ (the “forward” key, top row, F2)
  6. Type
    chronos

    and hit enter

  7. Type
    sudo dump_vpd_log --full –stdout

    and hit enter

“Product S/N” is your serial number!  Let me know if this helped you or if you have any questions in the comments.

Youtube URL Modifiers

youtube_logoYoutube is an essential tool for most teachers these days.  Over the years I’ve received several questions regarding integrating youtube videos into presentations. For example:

  • Can I play just a portion of a video?
  • Can I remove the related videos from being shown at the end?
  • Can I make the video full screen automatically?

All of these things are simple to do when using the embedded player.  The embedded player is designed to be used when embedding content into a website or blog post.  It can also be used to access just the video portion of a youtube page in a browser window.

For the following examples, I will be using the ever-popular keyboard cat video.

http://www.youtube.com/watch?v=J—aiyznGQ

When you click the link above, you’ll be directed to the video in the standard youtube interface.  It is important to understand the anatomy of this link so that you can apply this concept to other videos.  There are three distinct parts:

  1. The root site URL:  “http://www.youtube.com/”.  This tells your browser that you are looking to load a page hosted at youtube.com
  2. The player: “watch?v=”.  This tells youtube you are looking to use the standard player (the “watch” part) and that it can expect to find which video I’m trying to load after the equal sign.
  3. The video ID: “J—aiyznGQ”.  This is the part of the URL that identifies the video.  Each youtube video has a unique video ID.

Now to load our video in the embedded player, all you need to do is change “watch?v=” to “embed/”.  You can do it yourself, or click the link below.

http://www.youtube.com/embed/J—aiyznGQ

You should find the player loaded in full screen mode and in a stopped state.  I prefer linking to the embedded player in my presentations; I’m almost always needing to play the video full screen anyway.

The real power in the embedded player comes from the modifiers one can add to the end of the embedded video URL.  A few examples:

  • “&rel=0” will not display “related videos” when your video is over
  • “&autoplay=1” will automatically start playing the video upon load
  • “&loop=1” will play the video in a loop
  • “&start=33” will start the video at the 33 second mark
  • “&stop=37” will stop the video at the 37 second mark

One or more of these can be added at the end of the URL.  They need to be seperated from the video ID by a “?”.  In a basic example, if we wanted to open our video and play it immediately, the URL we would use would be:

http://www.youtube.com/embed/J—aiyznGQ?&autoplay=1

And for a more advanced example, let’s create a URL that automatically plays, starting at the 33 second mark and stopping at the 37 second mark, that does not show any related videos after it is complete.

http://www.youtube.com/embed/J—aiyznGQ?&autoplay=1&rel=0&start=33&end=37

A list of available parameters for the embedded player can be found here.

If you have any questions, please leave a comment below.