- Make a new Google Sheet
- Go to Tools -> Script editor...
- Copy and paste the script from below (
code.gs) over the sample function text, and save the project (any name will do)
- Run function #1 and wait
- Run function #2 and wait
| // https://developers.google.com/apps-script/guides/web | |
| // | |
| function doPost(e) { | |
| if (!e.parameter.filename) { | |
| return HtmlService.createHtmlOutput("Don't forget a filename parameter in the URL!"); | |
| } | |
| if (!e.postData.contents) { | |
| return HtmlService.createHtmlOutput("No POST data received :("); | |
| } | |
| // create a new folder in Google Drive |
code.gs) over the sample function text, and save the project (any name will do)| function run() { | |
| findAndNuke("blah@gmail.com"); | |
| } | |
| /** | |
| * This simple script gets all of your events on your calendar and deletes any that were created by "id". | |
| * Useful for rogue events created by email addresses that don't exist anymore. | |
| * | |
| * @param {string} id (email address) of the creator of the events you want to get rid of | |
| */ |
Add this function to your Apps Script project and feed it an ID to a Google Doc.
If you need this on a lot of Docs, you may want to make a new Apps Script project to use as a library. Simply copy and paste this code to the new project, go to the script that's tied to your Doc, add your new Library (the script ID), and call var html = *NameOfYourLibraryProject*.getContent(DocumentApp.getActiveDocument().getId());
| //<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.3/chroma.min.js"></script> | |
| function getColorFromTemp(tempInF) { | |
| // establish the chroma 'scale' object | |
| var tempScaleColors = ["#111111", "#21006B", "#4C006B", "#6B006B", "#990099", "#B300B3", "#CC00CC", "#E600E6", "#FF02FF", "#D100FF", "#9E01FF", "#6600FF", "#1800FF", "#144AFF", "#0E74FF", "#00A4FF", "#00CBFF", "#00E6FF", "#00FFFF", "#01FFB3", "#7FFF00", "#CEFF00", "#FEFF00", "#FFE601", "#FFCB00", "#FFAE00", "#FF9900", "#FE7F00", "#FF4F00", "#FF0700", "#FF4545", "#FF6968", "#FF8787", "#FF9E9E", "#FFB5B5", "#FFCFCF", "#FFE8E8", "#EEEEEE"]; | |
| var tempScale = chroma.scale(tempScaleColors).domain([-60,130]).mode('lab'); | |
| // extract color from chroma scale by giving it a temp number | |
| var color = tempScale(tempInF); | |
| return color; | |
| } |
| #!/bin/bash | |
| read -p "Case-sensitive name of the VM: " vmname | |
| if [[ -z $vmname ]]; then | |
| echo "$(tput setaf 1)Please enter a valid VM Name$(tput sgr0)" | |
| exit 1 | |
| fi | |
| if [[ $vmname =~ \ |\' ]]; then | |
| echo "$(tput setaf 3)Be warned, there have been reports that this may not work with VM Names that contain spaces$(tput sgr0)" | |
| fi | |
| echo "What resolution would you like the VM guest to be?" |
| // copy this to the bottom of your script, then call it on your array of CalendarEvent objects that you got from the CalendarApp | |
| // | |
| // ex: | |
| // var sortedEvents = sortArrayOfCalendarEventsChronologically(events); | |
| // or | |
| // events = sortArrayOfCalendarEventsChronologically(events); | |
| function sortArrayOfCalendarEventsChronologically(array) { | |
| if (!array || array.length == 0) { | |
| return 0; |
| // possible options: https://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets (image file names) | |
| function getWundergroundIcon(condition) { | |
| var conditionEmoji = ""; | |
| if (condition.indexOf("sunny") > -1 || condition.indexOf("clear") > -1) { | |
| conditionEmoji = "☀️ "; | |
| } else if (condition.indexOf("partlysunny") > -1 || condition.indexOf("mostlysunny") > -1) { | |
| conditionEmoji = "⛅ "; | |
| } else if (condition.indexOf("partlycloudy") > -1 || condition.indexOf("mostlycloudy") > -1) { | |
| conditionEmoji = "🌥 "; | |
| } else if (condition.indexOf("cloudy") > -1 || condition.indexOf("fog") > -1 || condition.indexOf("hazy") > -1) { |
The app Muzei (https://muzei.co/) has lots of plugins (https://play.google.com/store/search?q=muzei&c=apps). I would like you to create one in Java that uses the Flickr API and Android Awareness APIs. Familiarity in Retrofit, REST APIs, and the Android Awareness API are a must. App itself will have no launcher icon and no UI, and will act as a plugin for Muzei.
When the Art Source is selected, the finished app must:
When it's time for a refresh, the finished app must: