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 iconv = require ("iconv-lite"); | |
const request = require ("request"); | |
const utils = require ("daveutils"); | |
var feedUrl = "https://www.presseportal.de/rss/dienststelle_110972.rss2"; | |
function getCharset (httpResponse) { | |
var contentType = httpResponse.headers ["content-type"]; | |
if (contentType !== undefined) { | |
var encoding = utils.trimWhitespace (utils.stringNthField (contentType, ";", 2)); |
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 iconv = require ("iconv-lite"); | |
const request = require ("request"); | |
const utils = require ("daveutils"); | |
var feedUrl = "https://www.presseportal.de/rss/dienststelle_110972.rss2"; | |
function getCharset (httpResponse) { | |
var contentType = httpResponse.headers ["content-type"]; | |
if (contentType !== undefined) { | |
var encoding = utils.trimWhitespace (utils.stringNthField (contentType, ";", 2)); |
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
{ | |
"s3ServeFromPath": "/publicfolder.io" | |
} |
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 s3FolderExists (s3path, callback) { | |
var flHaveCalledBack = false; | |
var splitpath = s3.splitPath (s3path); | |
var pathToLookFor = splitpath.Key + "/"; | |
s3.listObjects (s3path, function (obj) { | |
if (obj.flLastObject === undefined) { | |
if (utils.beginsWith (obj.Key, pathToLookFor)) { | |
if (!flHaveCalledBack) { | |
callback (true); | |
flHaveCalledBack = true; |
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
{ | |
"#pagePark": { | |
"urlRedirect": "http://scripting.com/" | |
} | |
} |
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
{ | |
"methodCall": { | |
"methodName": "examples.echoParams", | |
"params": [ | |
"#dateTime=2018-06-10T19:41:06.199Z", | |
"#base64=aGVsbG8gd29ybGQ=" | |
] | |
} | |
} |
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
{"defaultType": "text/html"} |
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
{ | |
"id": 3839, | |
"id_str": "3839", | |
"name": "scripting.com", | |
"screen_name": "davewiner", | |
"location": "New York", | |
"profile_location": null, | |
"description": "American software developer, blogger, inventor of new media types.", | |
"url": "https://t.co/ztgzDGiyOj", | |
"entities": { |
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
{ | |
"name": "repocontents", | |
"description": "Code to get the contents of a respository.", | |
"author": "Dave Winer <[email protected]>", | |
"version": "0.4.0", | |
"main": "repocontents.js", | |
"scripts": { | |
"start": "node repocontents.js" | |
}, | |
"dependencies" : { |
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 utils = require ("daveutils"); | |
const yaml = require ("js-yaml"); | |
function yamlIze (jsontext) { | |
var jstruct = JSON.parse (jsontext); | |
const delimiter = "---\n"; | |
var text = jstruct.text; | |
delete jstruct.text; | |
var s = delimiter + yaml.safeDump (jstruct) + delimiter + text; |