This file contains 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
function load_helpers() { | |
data["page_title"] = page_title() | |
} | |
function page_title( title) { | |
if (data["title"]) { | |
title = data["title"] " - " | |
} |
This file contains 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/sh | |
outname="$1"; shift | |
target="${outname}.tif" | |
scanimage --format tiff --resolution 300 --mode Gray > "$target" && \ | |
convert "$target" -colorspace gray -level 10%,90%,1 -blur 2 +dither -monochrome "${outname}_bw.tif" && \ | |
tiff2pdf -o "${outname}.pdf" "${outname}_bw.tif" |
This file contains 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
function getEmails() { | |
// set spreadsheet and retrieve labels | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var name = "LABEL"; | |
// create sheets and clear content | |
var label = GmailApp.getUserLabelByName(name); | |
var sh = ss.getSheetByName(label.getName()) || | |
ss.insertSheet(label.getName(), ss.getSheets().length); | |
sh.clear(); |
This file contains 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
<?php | |
$dir = '/var/www/html'; | |
if (getenv('WORDPRESS_PATH')) { | |
$dir = getenv('WORDPRESS_PATH'); | |
} | |
require_once($dir . '/wp-load.php'); | |
class PageSync | |
{ | |
public static function export() { |
This file contains 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/sh | |
# html5vid.sh | |
# | |
# Encode an input video to multiple html5-ready formats: | |
# - webm | |
# - ogv | |
# - mp4 | |
# - png (50th frame) | |
# |
This file contains 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/awk -f | |
# | |
# goal-calc | |
# | |
# Returns a weekly budget amount given the date of your next | |
# paycheck, a target date, and a target amount. | |
# | |
# USAGE | |
# | |
# If you're next paycheck will be arriving on 2011/08/29 and you have |
This file contains 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/awk -f | |
# | |
# budget-calc | |
# | |
# Builds a budget to save for upcoming bills | |
# | |
# USAGE | |
# | |
# Given a budget file like this with bill costs per month: | |
# |
This file contains 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/sh | |
# | |
# rlc: resize like crazy | |
# | |
# rlc.sh targetdir | |
target=$1 | |
destination=$target-resized | |
dimensions=1000x | |
quality=100 |
This file contains 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/sh | |
# | |
# Synopsis: | |
# Sometimes I have to use MACOSX fonts on my Linux machine. | |
# They come in from a zip file, but the fonts are hidden files | |
# in a __MACOSX directory in the zip. This script handles | |
# unzipping the file, moving the hidden font files into my user | |
# font directory and updating my font cache automatically. | |
# | |
# Description: |
NewerOlder