This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A constant array defining the tools that this server makes available. | |
* Each tool is an object with a name, description, and an input schema. | |
*/ | |
const AVAILABLE_TOOLS = [ | |
{ | |
name: "read_recent_email", | |
description: | |
"Reads the subject line of the most recent email thread in your inbox.", | |
inputSchema: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function archiveDependabotPullRequestsThatHaveBeenMerged() { | |
const threads = GmailApp.search('label:"inbox" from:dependabot[bot]'); | |
for (let thread of threads) { | |
if (isMerged(thread)) { | |
thread.moveToArchive(); | |
}; | |
} | |
} | |
const patterns = [/This PR is included in version/, /Merged .* into .*/, /Closed /]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
rateLimit { | |
limit | |
cost | |
remaining | |
resetAt | |
} | |
repository(owner: "${owner}", name: "${name}") { | |
description | |
issues(last: 10) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MyRequest extends Partial<AxiosRequestConfig> { | |
params: { | |
foo: string; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MyRequest extends AxiosRequestConfig { | |
params: { | |
foo: string; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
babel( | |
name = "transpiled", | |
args = ["$(location :app)", "--out-file", "$@/transpiled.js"], | |
data = [":app", "@npm//@babel/preset-env", "//:babel.config.json"], | |
outs = ["transpiled.js"], | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WMS and Google Maps</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<style> | |
/* Always set the map height explicitly to define the size of the div | |
* element that contains the map. */ | |
#map { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var landcover = new google.maps.ImageMapType({ | |
getTileUrl: getTileUrl, | |
name: "Landcover", | |
alt: "National Land Cover Database 2016", | |
minZoom: 0, | |
maxZoom: 19, | |
opacity: 1.0 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getTileUrl = function(coordinates, zoom) { | |
return ( | |
"https://www.mrlc.gov/geoserver/NLCD_Land_Cover/wms?" + | |
"&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1" + | |
"&LAYERS=mrlc_display%3ANLCD_2016_Land_Cover_L48" + | |
"&FORMAT=image%2Fpng" + | |
"&SRS=EPSG:3857&WIDTH=256&HEIGHT=256" + | |
"&BBOX=" + | |
xyzToBounds(coordinates.x, coordinates.y, zoom).join(",") | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EXTENT = [-Math.PI * 6378137, Math.PI * 6378137]; | |
function xyzToBounds(x, y, z) { | |
var tileSize = EXTENT[1] * 2 / Math.pow(2, z); | |
var minx = EXTENT[0] + x * tileSize; | |
var maxx = EXTENT[0] + (x + 1) * tileSize; | |
// remember y origin starts at top | |
var miny = EXTENT[1] - (y + 1) * tileSize; | |
var maxy = EXTENT[1] - y * tileSize; | |
return [minx, miny, maxx, maxy]; |
NewerOlder