Skip to content

Instantly share code, notes, and snippets.

View scripting's full-sized avatar

Dave Winer scripting

View GitHub Profile
{
"created_at": "Sun May 01 15:07:15 +0000 2022",
"id": 1520781905175662600,
"id_str": "1520781905175662594",
"full_text": "Wordle 316 5/6\n\n⬜⬜⬜⬜⬜\n⬜🟩⬜⬜⬜\n⬜⬜⬜🟨⬜\n⬜🟩🟩⬜⬜\n🟩🟩🟩🟩🟩",
"truncated": false,
"display_text_range": [
0,
45
],
@scripting
scripting / rollover.js
Created January 1, 2022 15:58
This is the code I ran to do a rollover of the index of my blog in Daytona
daytona.removeOutlineRefs ("http://drummer.scripting.com/davewiner/blog.opml")
daytona.ping ("https://raw.githubusercontent.com/scripting/Scripting-News/master/blog/opml/2021/12.opml")
@scripting
scripting / root.txt
Last active December 29, 2021 15:20
Example from my E/D
user {
prefs: {
dropboxfolder: "/users/davewiner/Dropbox/",
publicfolder: "/users/davewiner/publicFolder/"
}
}
@scripting
scripting / convertOpmlArchive.txt
Created December 22, 2021 16:45
A script that runs in Frontier to convert the big OPML archive to the current form.
on convertOpmlArchive () {
«Changes
«12/21/21; 3:25:01 PM by DW
«This script converts the archive from the form I found it in on scripting.com, to the form used in the GitHub-based archive.
«Input: One OPML file for each day.
«Output: One OPML file for each month, broken down by day inside the outline.
«All other files, indexes and sitemaps, garbage left around by crappy server software, were not passed through.
local (sourcefolder = "Macintosh HD:Users:davewiner:tmp:opmlArchive:");
local (destfolder = "Macintosh HD:Users:davewiner:tmp:opmlArchive2:");
fileloop (fyear in sourcefolder) {
@scripting
scripting / config.json
Last active November 24, 2021 14:24
An example config.json for PublicFolder that does not delete files when they are removed from the watched folder.
{
"watchFolder": "/Users/cluelessnewbie/publicFolder/",
"s3Folder": "/mybucket.com/publicfolder/",
"urlS3Folder": "http://mybucket.com/publicfolder/",
"flDeleteEnabled": false
}
@scripting
scripting / buildVerbList.js
Last active November 24, 2021 16:01
A script that generates the current list of Drumkit verbs.
//Changes
//11/23/2021 by DW
//Updated to handle a subcategory of verbs, such as op.attributes.
//11/22/2021 by DW
//http://drummer.scripting.com/davewiner/verblist.opml
var theOutline = {
opml: {
head: {
title: "Drumkit verb list",
dateCreated: "Mon, 22 Nov 2021 21:49:22 GMT",
@scripting
scripting / getCursorLink.js
Last active November 15, 2021 15:46
The source for the Drummer oldSchool.getCursorLink verb.
@scripting
scripting / gist:a71e0730a5f5ac89c2ff101aeba46856
Created October 21, 2021 20:32
An example of a config.json file for use with Drummer to store the Public Folder log on S3.
{
"watchFolder": "/Users/cluelessnewbie/publicFolder/",
"s3Folder": "/mybucket.com/publicfolder/",
"urlS3Folder": "http://mybucket.com/publicfolder/",
"flUploadLog": true,
"s3LogPath": "/mybucket.com/publicfolderlog.json"
}
@scripting
scripting / credentials
Created October 12, 2021 16:34
Example of a Amazon credentials file, so Node apps can write to S3 (not actual passwords)
[default]
aws_access_key_id=tz4nhbttfvll76gb9ej7
aws_secret_access_key=cedx5jixadnwca1e3fnopkg8ji6cvynx4nlhgpy8
@scripting
scripting / code.js
Last active August 29, 2021 14:40
Local file-chooser dialog in HTML and JavaScript. This app opens a text file on the local computer and displays the file text in the JavaScript console.
function readFile (file) {
var url = window.URL.createObjectURL (file);
var reader = new FileReader ();
reader.onload = function (e) {
var filetext = reader.result;
console.log (filetext);
}
reader.readAsText (file);
}
function openDialogCommand (fileTypes) {