This file contains 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
//will retrieve the status from file and return it as json to the client | |
<?php | |
$filename = "mdstatus.txt"; | |
if ($_SERVER['REQUEST_METHOD'] === 'GET') { | |
//get the file | |
// Open the file | |
$fp = @fopen($filename, 'r'); | |
// extract each line to an array |
This file contains 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
//pass text from a cell (e.g. A1) to call the function by entering the following in to a cell '=getDomain(A1)' | |
//The result, when obtained, will then be seen in the cell (A1, in this example). | |
//requires a free Clearbit account and your api token, which you need to enter below by replacing 'YOUR_TOKEN_HERE' | |
function getDomain(domain) { | |
var url = "https://company.clearbit.com/v1/domains/find?name="+domain; | |
var options = { | |
"headers" : { | |
Authorization:"Bearer YOUR_TOKEN_HERE" | |
} |
This file contains 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
//run this on a server to output the UI for a client | |
//references config from touchpad.json and images from an adjacent img folder | |
//you need to add the local ip of the machine you are trying to control via BTT. | |
//This will then be stored in a cookie so that you don't have to add it each time. | |
//A later version will have a proper implementation of tabs so that you can switch | |
to different sets of icons to trigger functions in BTT. | |
<html> | |
<head> | |
<style> |
This file contains 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
// this will check a range, and if cell is in range, then | |
//add a time stamp to the top of the column wherein the change was made. | |
function onEdit(e) | |
{ | |
var editRange = { // B4:J6 | |
top : 9, | |
bottom : 255, | |
left : 2, | |
right : 7 |