Skip to content

Instantly share code, notes, and snippets.

View alderete's full-sized avatar

Michael A. Alderete alderete

View GitHub Profile
@iansoper
iansoper / CodaLight.scpt
Created December 15, 2010 15:35
Open your web development project in TextMate + Transmit + Terminal (kinda like Coda)
-- Coda Light
--
-- By Henrik Nyh <http://henrik.nyh.se>, 2007-04-26
-- His original script: http://henrik.nyh.se/2007/04/coda-light-applescript
--
-- Changes for Transmit 4 and AppleScript 2 by Ian Soper <http://iansoper.com>, 2010-12-15
--
-- An AppleScript to start working on a web development project by
-- * opening the project in TextMate,
-- * opening related URLs in the default browser,
@alderete
alderete / my_looper-no_comments.php
Created February 4, 2011 08:06
A starter template for the Custom Loop API in the Thesis theme for WordPress.
<?php
// Source and explanation of this file:
// http://aldosoft.com/blog/2011/01/thesis-custom-loop-template/
class my_looper extends thesis_custom_loop {
function home() {
thesis_loop::home();
}
@kevinold
kevinold / pragprog_magazines.sh
Created August 19, 2011 17:01
Quickly download all Pragprog magazines for this year
for i in 19 20 21 22 23 24 25 26; do wget "http://pragprog.com/magazines/download/$i.mobi"; done
@dpk
dpk / gist:646570
Created October 26, 2010 09:05
View Generated Source in BBEdit
-- based on John Gruber's original Safari Source in BBEdit script
-- http://daringfireball.net/2003/01/safari_source_in_bbedit
-- and duct tape
tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1
tell application "BBEdit"
activate
make new text window with properties ¬
{contents:theSource, source language:"HTML"}
@ryanb
ryanb / favorite_gems.md
Created March 4, 2011 17:31
A list of my favorite gems for various tasks.
@joshearl
joshearl / SublimeProjectExample.sublime-project
Created November 17, 2012 02:32
Sample Sublime project file with project-specific settings
{
"folders":
[
{
"path": "Leanpub/sublime-productivity",
"folder_exclude_patterns": ["epub_images", "convert_html", "preview", "published"],
"file_exclude_patterns": [".gitignore", "*.sublime*", "*Icon*"]
},
{
"path": "SublimeTextTips"
@palkan
palkan / gist:31a70fd45b2b43024370
Created February 3, 2015 08:15
Convert all audio files within directory to MP3 (320) with FFMPEG
#!/usr/bin/env ruby
CONVERT_COMMAND = "ffmpeg -i ':input' -vn -ar 44100 -ac 2 -ab 320 -f mp3 ':output'"
def is_audio?(filename)
filename =~ /\.(wav|flac|aac)$/
end
def extract_name(filename)
File.basename(filename, File.extname(filename))+".mp3"
@gruber
gruber / Google Search
Created April 14, 2011 23:09
Perl script that can be used to create a system-wide service to do a Google web search. Input is the selected text in whatever the current app is. The result is a new Google query using your default web browser. (Mac OS X's built-in Search Google service
@robjwells
robjwells / CopyCleaner.applescript
Last active April 28, 2021 03:00
BBEdit & TextWrangler text clean-up script for the Morning Star newspaper
-- By Rob Wells for the Morning Star
on open theStories
repeat with aStory in theStories
tell application "TextWrangler"
open aStory
tell the front text document
set encoding to "Unicode (UTF-8)"
educate quotes with replacing target
@JoshStark
JoshStark / convert_audible.sh
Last active June 18, 2021 06:28
A script which combines audible-cli and update_chapter_titles.py to create a 1-1 m4b file from an aax file.
#!/bin/bash
# This script has a few pre-requisites:
#
# 1. The audible-cli must be installed and available in the $PATH.
# https://github.com/mkb79/audible-cli
# e.g. export PATH=$PATH:/home/$(whoami)/.local/bin
#
# 2. The update_chapter_titles.py must also be present in the same
# directory as this file. This also relies on python3 being in the $PATH