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
-- Adapted from these sources: | |
-- http://peterdowns.com/posts/open-iterm-finder-service.html | |
-- https://gist.github.com/cowboy/905546 | |
-- | |
-- Modified to work with files as well, cd-ing to their container folder | |
on run {input, parameters} | |
tell application "Finder" | |
set my_file to first item of input | |
set filetype to (kind of (info for my_file)) | |
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer: |
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/env node #// -*- Mode: Node.js JavaScript; tab-width: 4; -*- | |
/* | |
--- | |
url: http://gist.github.com/441101 | |
name : safari-get-html | |
description : safari-get-html will rock your socks! | |
authors : Thomas Aylott | |
copyright : © 2010 Thomas Aylott | |
license : MIT |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
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/bash | |
# Fallback base64 en-/decoder for systems that lack a native implementation | |
# | |
# @param ... - flags | |
which base64 &>/dev/null || { | |
# if even od is missing | |
which od &>/dev/null || od() | |
{ | |
local C O=0 W=16 |
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 | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
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
require 'rubygems' | |
require 'rubygems/package' | |
require 'zlib' | |
require 'fileutils' | |
module Util | |
module Tar | |
# Creates a tar file in memory recursively | |
# from the given path. | |
# |
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/bash | |
# Convert a Github Flavored Markdown Syntax file to HTML | |
# | |
# The MIT License (MIT) | |
# Copyright © 2012 Evertton de Lima <e.everttonlima@gmail.com> | |
# http://evertton.mit-license.org/ | |
# Stylesheet feature by Dan Untenzu <mail@pixelbrackets.de> | |
# | |
# Requirements: cURL (sudo apt-get install curl) |
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 | |
svnstyle(){ sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" -e 's/@@\(.*\)@@.*/@@\1@@/g' ;} | |
DIFFPARAMS='--no-prefix --ignore-space-at-eol --minimal' | |
git diff $DIFFPARAMS "$@" | svnstyle |
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
next-server 10.0.3.2; | |
if ( substring(option vendor-class-identifier, 0, 9) = "AAPLBSDPC" | |
and substring(option vendor-class-identifier, 10, 4) = "i386" ) { | |
# This needs to be there to tell the client we're an Apple boot server | |
option vendor-class-identifier "AAPLBSDPC"; | |
# Normally the client asks for a list, we respond, they tell us what we want, | |
# then we send a select back with the information of that image. | |
# This skips all that and forces the select down to the client. | |
option vendor-encapsulated-options 01:01:02; | |
# Use ipxe.efi for native drivers, or snponly.efi for underlying UNDI |
OlderNewer