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
// Copyright 2020, Dave Winer | |
// Copyright 2013, Small Picture, Inc. | |
var concordKeystrokes = { | |
"backspace": "backspace", | |
"tab": "tab", | |
"return": "return", | |
"delete": "delete", | |
"uparrow": "cursor-up", | |
"downarrow": "cursor-down", |
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
//translate a url in this form: http://my.this.how/davewiner/example.opml | |
//to a file path like this: /root/apps/littleoutliner/publicFiles/users/davewiner/myOutlines/example.opml | |
exports.filter = filter; | |
const folder = "/root/apps/littleoutliner/publicFiles/users/"; | |
function filter (options, callback) { | |
var url = options.httpRequest.url; | |
var splits = url.split ("?"); |
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
{ | |
"mirrors": { | |
"/": "http://scripting.com/images/2020/04/11/driveway.png" | |
} | |
} |
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
const zip = require ("davezip"); | |
const fs = require ("fs"); | |
const theArchiveFile = zip.createArchive ('outlines.zip"); | |
fs.fileloop ("/users/bullmancuso/publicfiles/", function (err, f) { //I made up fs.fileloop, it would be nice ;-) | |
if (f.hasExtension (".opml")) { | |
zip.addToArchive (f, theArchiveFile); | |
} | |
}); | |
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
exports.helloWorld = function () { | |
return ("hello world"); | |
} |
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 runFilterScript (host, callback) { //3/23/20 by DW | |
var f = getFullFilePath (domainsPath) + host + filterFname; | |
fs.readFile (f, function (err, data) { | |
if (err) { | |
callback (false); //file doesn't exist -- we didn't run the filter script | |
} | |
else { | |
try { | |
const options = { | |
httpRequest, |
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
#!/bin/sh | |
aws s3 cp example.sh s3://scripting.com/tmp/example.sh --acl public-read |
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
[default] | |
aws_access_key_id=udafkgisftiaoo4j37xv | |
aws_secret_access_key=kxx6njofyi37wvix2ncask8f5gs5dt3qfi2qucyg |
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
on httpClient(method="GET", resource="/", adrParams=nil, content=nil, adrMeta=nil, acl=nil, content_type="", idaccount="default", debug=false, flHttpMessages=false) { | |
«Changes | |
«8/24/13; 10:50:08 AM by DW | |
«If the metadata key is website-redirect-location, then we special-case the addition of the header so as not to add the string "meta-" -- which causes it to break. Not sure if the setting metadata feature ever worked, but this is the most conservative approach to avoiding breakage. | |
«7/10/06; 8:38:52 PM by DW | |
«Added flHttpMessages optional param, default false. Determines if HTTP calls display messages in the About window. | |
«4/11/06; 7:11:53 AM by DW | |
«Changed name of the compiled xml structure to xstruct. It's generally not a good idea to use the names of built-in tables in naming data or code, although this naming couldn't have hurt anything because it's in a table. | |
«Fixed the error-handling code. If the server returns an error, we throw a scriptError, but before doing that, we set various |
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
const urlfeed = "http://bingeworthy.io/rss.xml"; | |
function httpRequest (url, timeout, headers, callback) { | |
timeout = (timeout === undefined) ? 30000 : timeout; | |
var jxhr = $.ajax ({ | |
url: url, | |
dataType: "text", | |
headers, | |
timeout | |
}) |