Skip to content

Instantly share code, notes, and snippets.

View scripting's full-sized avatar

Dave Winer scripting

View GitHub Profile
@scripting
scripting / mylist.opml
Last active July 8, 2017 07:29
An example of an OPML subscription list that includes another list.
<?xml version="1.0"?>
<opml version="2.0">
<head>
<title>mylist.opml</title>
</head>
<body>
<outline text="Feeds" type="include" url="https://dl.dropboxusercontent.com/u/36518280/river5/includedTestList2.opml"/>
</body>
</opml>
<html>
<head>
<title>GitHub API: Get repo directory</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
<link href="http://fargo.io/code/bootstrap.css" rel="stylesheet">
<script src="http://fargo.io/code/bootstrap.min.js"></script>
<link href="http://fargo.io/code/ubuntuFont.css" rel="stylesheet" type="text/css">
<script>
<html>
<head>
<title>GitHub API: Get repo directory</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
<link href="http://fargo.io/code/bootstrap.css" rel="stylesheet">
<script src="http://fargo.io/code/bootstrap.min.js"></script>
<link href="http://fargo.io/code/ubuntuFont.css" rel="stylesheet" type="text/css">
<script>
@scripting
scripting / hello.js
Created June 23, 2017 13:56
Hello World for githubpub
const githubpub = require ("githubpub");
var config = {
port: 5376,
domains: {
"githubpub.scripting.com": {
username: "scripting",
repository: "Scripting-News",
path: "githubpub"
}
@scripting
scripting / tweetsInMyRss.xml
Last active June 28, 2017 14:46
A fragment of the Scripting News RSS feed showing how a tweeted item is represented.
<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>
@scripting
scripting / permissions.json
Created August 9, 2017 13:30
Permissions used in a Scripting News howto
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::bloatware.org"]
},
{
"Effect": "Allow",
@scripting
scripting / helloworld.js
Created August 9, 2017 15:05
Hello world for S3 in JavaScript
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) {
@scripting
scripting / example.js
Last active September 6, 2017 13:58
Code that's part of "Instant Dave" that makes links open in an external window
//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);
});
}
@scripting
scripting / config.json
Created September 18, 2017 17:09
The config.json file I use on my desktop to store stuff on scripting.com.
{
"watchFolder": "/Users/davewiner/publicFolder/",
"s3Folder": "/scripting.com/publicfolder/",
"urlS3Folder": "http://scripting.com/publicfolder/"
}
@scripting
scripting / config.json
Created September 27, 2017 19:25
Example of config.json for my.this.how
{
"localPath": "/home/ubuntu/Dropbox/Nodescripts2/littleoutliner/publicFiles"
}