Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# author: Thomas Aylott SubtleGradient.com
echo "Transmitting"
for i in `git log -${1:-1} $2 --name-only|grep -E '^[^ ]+$'|sort|uniq`; do
if [[ -e $i ]]; then
echo " $i"
open -a Transmit $i
fi
done
@ashizawa
ashizawa / 0_reuse_code.js
Created November 5, 2013 06:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
### define function variable before block to avoid code being appended to closing part of JSDoc comment ###
cube = ''
###*
* Funtion to calculate cube of input
* @param {number} Number to operate on
* @return {number} Cube of input
###
cube = (x) -> x*x*x

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@ashizawa
ashizawa / xhtml_func.el
Created April 14, 2012 07:06
delete html tags space and add end slash.
(defun xhtml-delete-dust-region ()
"Run delete space on the current region."
(interactive)
(save-excursion
(shell-command-on-region (point) (mark) "perl -i -p -e 's{<(img|input|link|meta|br|param|hr)(.*?)(\s/)?>}{<$1$2 />}g'" nil t)
(shell-command-on-region (point) (mark) "perl -i -p -e 's{>\s+<}{><}g'" nil t)
(shell-command-on-region (point) (mark) "perl -i -p -e 's{(\w)\s+<}{$1<}g'" nil t))
)
(defun xhtml-delete-dust-buffer ()
"Run delete space on the current buffer."