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
var http = require("http"); | |
var https = require("https"); | |
var { SourceMapConsumer } = require("source-map"); | |
var fs = require("fs").promises; | |
var path = require("path"); | |
var fetch = function(address) { | |
return new Promise(function(ok, fail) { | |
var parsed = new URL(address); | |
var remote = parsed.protocol == "http:" ? http : https; |
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
var request = require("request"); | |
var dateFormat = require("dateformat"); | |
var today = new Date(); | |
/* Format the date to be todays date in mm-dd-yyy format for later use */ | |
today = dateFormat(today, "mm-dd-yyyy"); | |
onCallDateFormat = dateFormat(today, "yyyy-mm-dd"); | |
var jiraUrl = ""; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello!</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
This space intentionally left blank. Test | |
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
var Node = function(type) { | |
this.type = type; | |
this.tagName = null; | |
this.attributes = {}; | |
this.children = []; | |
this.parentElement = null; | |
this.textContent = ""; | |
}; | |
Node.prototype = { |
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
var directors = { | |
"image": require("./image-scene"), | |
"audio": require("./audio-scene"), | |
"map": require("./map-scene") | |
}; | |
// state of the last block and director | |
var lastBlock = null; | |
var director = null; | |
// check blocks in reverse order |
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
var doc = DocumentApp.getActiveDocument(); | |
var body = doc.getBody(); | |
function renderMD(body, lines) { | |
if (typeof lines == "string") { | |
lines = lines.split("\n"); | |
} | |
lines.forEach(function(line) { | |
if (line.match(/^[-=+]+$/)) { | |
return body.appendHorizontalRule(); |
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
// test data -- we also use an identical "test.csv" to check streams | |
var csv = ` | |
one,two,three | |
1,2,3 | |
a,b,c | |
"1,000",1000,"hey there" | |
`.trim(); | |
// easy numeric indexes for iterables | |
var forEach = function*(iter) { |
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
/* | |
A library for wiring a state object up to HTML | |
- [data-bound] = Sets the innerHTML of the element | |
- [:attributeName] or [attr:attributeName] = Sets the value of attributeName | |
- [class:className] = Toggles className based on truthiness | |
- [on:event] = Bind event listeners to this element | |
It's like an unholy fusion of Vue and Backbone. Call set() on the state object to trigger a render. |
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
' Class module CSVWriter | |
Private Excel As Object | |
Private sheet As Object | |
Private book As Object | |
Private rowNum As Integer | |
Private Sub Class_Initialize() | |
Set Excel = CreateObject("Excel.Application") | |
Set book = Excel.Workbooks.Add | |
Set sheet = book.ActiveSheet |
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
Sub GetMessages() | |
readdir "folder_location" | |
End Sub | |
Sub readdir(folderName As String) | |
Dim fs As Scripting.FileSystemObject | |
Dim folder As Scripting.folder | |
Dim file As Scripting.file | |
Dim message As Object | |