Skip to content

Instantly share code, notes, and snippets.

Jennifer JenniferMack

Block or report user

Report or block JenniferMack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JenniferMack
JenniferMack / tz-diff.go
Created Jul 6, 2019
An easy way to print out two timezones side by side.
View tz-diff.go
package main
import (
"bytes"
"flag"
"fmt"
"text/tabwriter"
"time"
)
@JenniferMack
JenniferMack / https.go
Last active Jul 4, 2019
Sample TLS server in #go
View https.go
// Redirecting (http => https) server, will finish request before shutting down.
// All-in-one file for example purposes
// Everything below main would normally go into a `server.go` file to reduce clutter.
// Redirection is normally on, and can be disabled with `-redir=false` on the command line.
// Use with dummy certs for testing.
package main
import (
"context"
View Minnow-KB.kbd.json
[
{
"name": "Minnow-KB",
"author": "Jennifer Mack",
"background": {
"name": "Bamboo",
"style": "background-image: url('/bg/wood/bamboo.jpg');"
},
"radii": "5px",
"switchMount": "cherry",
@JenniferMack
JenniferMack / local.EDIT-FIRST.ulysses-backup.plist
Last active Aug 29, 2015
Launchd scheduling plist for backing up Ulysses for Mac files.
View local.EDIT-FIRST.ulysses-backup.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.ulysses-backup</string>
<key>ProcessType</key>
<string>Adaptive</string>
<key>ProgramArguments</key>
<array>
@JenniferMack
JenniferMack / wp-automator.rb
Last active Aug 29, 2015
Apple Automator script to post to WordPress from Ulysses
View wp-automator.rb
require 'xmlrpc/client'
wordpress = XMLRPC::Client.new_from_hash(
{ "host" => "yourblogurl",
"user" => "yourWPusername",
"password" => "yourWPpassword",
"use_ssl" => nil, #change to true if hosted on SSL
#-------------------------------------------------------#
"path" => "/xmlrpc.php"
})
@JenniferMack
JenniferMack / wp-post.rb
Last active Aug 29, 2015
Post to WordPress from Ulysses using the xmlrpc interface.
View wp-post.rb
#!/usr/bin/env ruby
require 'xmlrpc/client'
wordpress = XMLRPC::Client.new_from_hash(
{ "host" => "yourblogname",
"user" => "yourWPusername",
"password" => "yourWPpassword",
"use_ssl" => nil, #change to true if hosted on SSL
#-------------------------------------------------------#
@JenniferMack
JenniferMack / md-tables.rb
Created Apr 2, 2015
A simple table maker that outputs MarkdownXL for Ulysses.
View md-tables.rb
#! /usr/bin/env ruby
table = "~~\n~~ <table>\n"
ARGF.each_line do |line|
table << "~~ <tr>\n"
row = table =~ /th/ ? "td" : "th"
line.chomp.split('|').each {|cell| table << "~~ <#{row}>#{cell}</#{row}>\n" }
table << "~~ </tr>\n"
end
@JenniferMack
JenniferMack / md-toc.rb
Last active May 5, 2019
Create a table of contents for Ulysses markdown
View md-toc.rb
#!/usr/bin/env ruby
toc = "# Table of Contents\n"
newmd = ""
ARGF.each_line do |line|
newmd << line
next if !line.start_with?("#")
heading = line.gsub("#", "").strip
@JenniferMack
JenniferMack / fix-epub.rb
Last active Aug 29, 2015
ePub playOrder fix for Ulysses export
View fix-epub.rb
#!/usr/bin/env ruby
cnt = 1
cmd = ARGV[0]
file = ARGV[1]
begin
if cmd == "unzip"
system "unzip", "-q", file
ARGV.replace ["OPS/toc.ncx"]
elsif cmd == "zip"
@JenniferMack
JenniferMack / link-template
Last active Aug 29, 2015
WP link post template
View link-template
You can’t perform that action at this time.