GAS – Insert new row in Google Sheet using script

Probably not as quick as going Edit > Add Row Above/Below, but provides the starting pointing for extending this little snippet to add content, copy down formulas or “setFormulas” to some of the columns. Useful when working with long lists. This script will add a new row above the existing active cell.

Xubuntu 16.04 – Repair Nvidia Graphics Install

Don’t know / can’t remember exactly what happened but for some reason my proprietary Nvidia driver stopped working, I lost OpenGL, and with that a lot of functionality on the desktop. After living with it for a couple of months, and there are many different solutions to doing it, I finally got around to sorting it out like this: Continue reading

Startup Genymotion from CLI, resize and move it

My OpenGL for my graphics has been broken for a few weeks, and I have been missing using Genymotion for my AppInventor emulator. Finally fixed the graphics (another story) and Genymotion working once again. Would like a working environment on just one desktop, so need to resize the stock setup for Genymotion and move it over to the right. Here is a little bash script that does the lot: Continue reading

GAS – Send a Simple Email

Very often you want to email either yourself or another user with output from a script. In very simple terms you need to provide the email address, subject and body

You can, of course, replace the text areas with variables:

GAS – Vertically Align Rows in Sheet

Another simple but useful one, particularly for better presentation of Form Responses, so pop this into your onFormSubmit script:

GAS – Create PDF from Google Form Data, Save to Google Drive and Email It!

I’ll make some assumptions on this one, that you know how to create a Google Form and Responses sheet, and that you can create and edit a Google Doc

Create your Google Form with the questions you want. If you are inside a domain you can automatically collect the user’s email address too

Create a Google Document to use as a template. Leave space for user submissions, and in these spaces include a unique keyword for each answer Continue reading

Google Calendar – Add recurring event for “last Friday of each month”

It is not obvious how to do this, you have to use Google “magic”.

Let us say we want to hold a meeting on the last Friday of each month. Using the normal repeating options does not allow for this and will only offer the “fourth Friday each month”, thus missing out the several occasions in the year when there is a fifth Friday in the month

To achieve our goal do as follows: Continue reading

GAS – make a variable from a variable

Clever little ditty this one. Somtimes you need to create a dynamic variable on the fly, perhaps using data pulled in from a sheet or elsewhere that goes into a variable, but you then need to use that value as a variable name and assign it a value. This is how it is done:

I want the value of the variable value01 to become a variable name, result. I want to give result the value green, which is currently in the variable output01. If using a string in output01 you have to have the extra “‘” in the eval(), otherwise a number will not need them.

GAS – list files modified in the last 24 hours

If you need to keep track of what has been changed in your Google Drive, this script, set up with a time driven trigger in a google sheet is a lifesaver. Use it nearly every day. (Can’t claim the credit for this one!)