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:
- Attempt to get the user's location via the Fused Location API from Google Play Services
- If the location isn't granted, pop up dialog message saying it's required and ask again (loop until granted or cancelled)
- Start the initial refresh
When it's time for a refresh, the finished app must:
- Get current weather condition for user's location via the NWS JSON API v3 (happy to assist with this)
- Ask Flickr for photos for this location
I hereby claim:
- I am leoherzog on github.
- I am leoherzog (https://keybase.io/leoherzog) on keybase.
- I have a public key whose fingerprint is C4FF C7C8 309B 8E7F 9954 8BBB 17B9 6B0F B3EC DB85
To claim this, I am signing this object:
Muzei Weather Wallpaper Updater v2 (39) | |
<Kill the task if Wi-Fi isn't connected and the "Wi-Fi Only" setting is on> | |
A1: Stop [ With Error:Off Task:Muzei Weather Wallpaper Updater v2 ] If [ %WIFII !~ *CONNECTION* & %WWWIFIONLY ~ true ] | |
<Kill the task if the battery is low and the "Don't run on low battery" setting is on> | |
A2: Stop [ With Error:Off Task:Muzei Weather Wallpaper Updater v2 ] If [ %BATT < 15 & %WWDONTRUNONLOWBATTERY ~ true ] | |
A3: Variable Set [ Name:%flickrapikey To:0952e1ceeeca7a0e1b3867533ba4beff Do Maths:Off Append:Off ] | |
<#ProjectWeather Flickr Group ID> | |
A4: Variable Set [ Name:%projectweathergroupid To:1463451@N25 Do Maths:Off Append:Off ] | |
A5: Get Location [ Source:Net Timeout (Seconds):15 Continue Task Immediately:Off Keep Tracking:Off ] | |
<Turn network LAT,LONG into two variables> |