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
#!/usr/bin/env python | |
# This script is writted as a custom markdown processor with Marked 2 | |
# It takes markdown on standard input and writes rendered html5 to | |
# standard output. Unlike the built-in processors, this marks code | |
# blocks with CSS classes, which can be stylized with a stylesheet. | |
# This obviates the for javascript running on the client stylizing the | |
# code at page load. | |
import sys |
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
import Darwin | |
var utsInfo = utsname() | |
uname(&utsInfo) | |
let machine = withUnsafeBytes(of: &utsInfo.machine) { (ptr) -> String? in | |
return Data(ptr).withUnsafeBytes({ (ptr: UnsafePointer<CChar>) -> String? in | |
return String(cString: ptr) | |
}) | |
} |
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
#!/usr/bin/env python | |
import sys | |
import ssl | |
import subprocess | |
from xmlrpclib import ServerProxy | |
from markdown import markdown | |
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
#!/bin/bash | |
S3BUCKET="backup.bucket.name" | |
FILENAME="sitename-wordpress" | |
BACKUP_DIR=${HOME}backup/$(date "+%Y%m%dT%H%M%S") | |
mkdir -p $BACKUP_DIR | |
wp --path=$DOCUMENT_ROOT export --dir=$BACKUP_DIR | |
wp --path=$DOCUMENT_ROOT db export ${BACKUP_DIR}/${FILENAME}-$(date "+%Y%m%dT%H%M%S").sql |
OlderNewer