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 readRiverFile (relpath, callback) { | |
| var f = config.dataFolder + relpath; | |
| if (riverQueues [f] === undefined) { | |
| riverQueues [f] = [callback]; | |
| fs.readFile (f, function (err, data) { | |
| if (err) { | |
| console.log ("readRiverFile: err.message == " + err.message); | |
| } | |
| else { | |
| var theQueue = riverQueues [f]; |
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 request = require ("request"); | |
| const fs = require ("fs"); | |
| var myPost = { | |
| username: "scripting", | |
| repo: "test1", | |
| path: "ideas/plot.html", | |
| content: "<!DOCTYPE html>\n<html><body>A programmer writes a demo app. Everyone lives happily ever after.</body></html>", | |
| type: "text/html", | |
| committer: { |
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 runUserScript (s, scriptName) { | |
| var now = new Date (); | |
| function msg (s) { | |
| var package = { | |
| text: s, | |
| path: scriptName | |
| }; | |
| bullMancuso.send ("callback", "msg", utils.jsonStringify (package)); | |
| } | |
| function persist (objectName) { |
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
| local (sourcefolder = user.prefs.dropboxfolder + "public:misc:nodeeditor:fargo.io-code-publisher:"); | |
| local (githubfolder = user.prefs.githubfolder + "fargoPublisher:"); | |
| local (montaukfolder = user.prefs.dropboxfolder + "montauk:fargopub:"); | |
| on copyone (f1, f2) { | |
| file.surefilepath (f2); | |
| try { | |
| if file.readwholefile (f1) != file.readwholefile (f2) { | |
| file.copy (f1, f2) | |
| } |
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
| { | |
| "localPath": "/home/ubuntu/Dropbox/Nodescripts2/littleoutliner/publicFiles" | |
| } |
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
| { | |
| "watchFolder": "/Users/davewiner/publicFolder/", | |
| "s3Folder": "/scripting.com/publicfolder/", | |
| "urlS3Folder": "http://scripting.com/publicfolder/" | |
| } |
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
| //see blog post here -- http://scripting.com/2017/09/06.html#a094746 | |
| function openLinksInExternalWindow () { | |
| $(document).off ("click", 'a[href^="http"]'); //remove pre-existing click handlers | |
| $(document).on ("click", 'a[href^="http"]', function (event) { | |
| event.preventDefault (); | |
| electron.shell.openExternal (this.href); | |
| }); | |
| } |
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 AWS = require ("aws-sdk"); | |
| var s3 = new AWS.S3 (); | |
| const params = { | |
| Bucket: "bloatware.org", | |
| Key: "/testing/hello.txt", | |
| Body: "Hello World", | |
| ContentType: "text/plain", | |
| ACL: "public-read" | |
| }; | |
| s3.putObject (params, function (err, data) { |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": ["s3:ListBucket"], | |
| "Resource": ["arn:aws:s3:::bloatware.org"] | |
| }, | |
| { | |
| "Effect": "Allow", |
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
| <item> | |
| <description>Instead of Trump growing to fill the presidency, he's shrinking the presidency to fit Trump.</description> | |
| <pubDate>Wed, 28 Jun 2017 14:00:37 GMT</pubDate> | |
| <link>http://scripting.com/2017/06/28.html#a100637</link> | |
| <guid>http://scripting.com/2017/06/28.html#a100637</guid> | |
| <source:outline created="Wed, 28 Jun 2017 14:00:37 GMT" type="tweet" tweetId="880063536352899074" tweetUserName="davewiner" permalink="http://scripting.com/2017/06/28.html#a100637" text="Instead of Trump growing to fill the presidency, he's shrinking the presidency to fit Trump." /> | |
| </item> | |
| <item> |