Skip to content

Instantly share code, notes, and snippets.

View scripting's full-sized avatar

Dave Winer scripting

View GitHub Profile
@scripting
scripting / template.html
Last active May 26, 2016 15:27
Test version of the new default template for 1999.io
<html>
<head>
<title>[%title%]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="alternate" type="application/rss+xml" href="[%urlRssFeed%]" />
<script src="http://1999.io/dev/publish/code.js"></script>
<link rel="stylesheet" href="http://1999.io/dev/publish/styles.css"/>
@scripting
scripting / config.json
Last active May 17, 2016 14:25
Example of a config.json file with a plugIns section
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bullmancuso.io:1999",
"where": {
"flUseLocalFilesystem": true,
"publicPath": "publicFiles/",
"privatePath": "privateFiles/"
},
"plugIns": {
@scripting
scripting / config.json
Last active May 13, 2016 15:09
A config.json for nodeStorage that specifies a homePage object.
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bigbloat.io:1999",
"where": {
"flUseLocalFilesystem": true,
"publicPath": "publicFiles/",
"privatePath": "privateFiles/"
},
"homePage": {
@scripting
scripting / pagetable.json
Created April 13, 2016 03:20
An example pagetable while the page is running, accessible from JavaScript code running in the page.
{
"productname": "bloatWare",
"productnameForDisplay": "BloatWare",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;",
"urlTwitterServer": "http://localhost:1229/",
"urlPageTemplate": "/template.html",
"urlChatLogSocket": "ws://localhost:1230/",
"domain": "1999.io",
"nameChatLog": "davewiner",
"version": "0.88j",
@scripting
scripting / pagetable.json
Last active April 13, 2016 03:19
An example of a pagetable used when rendering a page in 1999.io.
{
"productname": "bloatWare",
"productnameForDisplay": "BloatWare",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;",
"urlTwitterServer": "http://localhost:1229/",
"urlPageTemplate": "/template.html",
"urlChatLogSocket": "ws://localhost:1230/",
"domain": "1999.io",
"nameChatLog": "davewiner",
"version": "0.88j",
@scripting
scripting / myPublishCallback.js
Created April 2, 2016 21:34
Example of a callback script for nodeStorage, used to mirror all files published by a user in another location
if (screenName == "bullmancuso") {
s3.newObject ("/bullman.io/mirror/" + relpath, body, type);
}
@scripting
scripting / config.json
Created March 30, 2016 16:18
Example of a config.json file that specifies the whitelist as an array.
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bullmancuso.io:1999",
"userWhitelist": ["bullmancuso", "lawyerboyer"],
"where": {
"flUseLocalFilesystem": true,
"publicPath": "publicFiles/",
"privatePath": "privateFiles/"
},
@scripting
scripting / config.json
Last active March 30, 2016 16:03
Example of a config.json file for nodeStorage that has an updates object and automatically restarts when there's a change to the main JavaScript file.
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bullmancuso.io:1999",
"urlUserWhitelist": "http://1999.io/docs/examplewhitelist.json",
"flWatchAppDateChange": true,
"fnameApp": "storage.js",
"updates": {
"enabled": true,
"fnameStorageJs": "storage.js",
@scripting
scripting / config.json
Created March 29, 2016 21:34
Example of a config.json file for nodeStorage that specified a whitelist.
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bullmancuso.io:1999",
"urlUserWhitelist": "http://1999.io/docs/examplewhitelist.json",
"where": {
"flUseLocalFilesystem": true,
"publicPath": "publicFiles/",
"privatePath": "privateFiles/"
},
@scripting
scripting / config.json
Last active March 27, 2016 21:12
Example of a config.json file for nodeStorage that sets up a 1999.io server
{
"myPort": 1999,
"websocketPort": 2000,
"myDomain": "1999.bullmancuso.io:1999",
"where": {
"flUseLocalFilesystem": true,
"publicPath": "publicFiles/",
"privatePath": "privateFiles/"
},
"twitterConsumerKey": "anm3unkb1mof7isav0bkxigby",