Skip to content

Instantly share code, notes, and snippets.

def empty_neighbor_cells(x,y)
return_value = []
neighbors(x, y).each do |neighbor|
return_value << neighbor if !occupied? neighbor
end
return_value
end
@joshwalsh
joshwalsh / Git Bash Prompt
Created January 13, 2011 20:40
Show directory, branch and time since last commit
# Prompt Setup
function minutes_since_last_commit {
now=`date +%s`
last_commit=`git log --pretty=format:'%at' -1`
seconds_since_last_commit=$((now-last_commit))
minutes_since_last_commit=$((seconds_since_last_commit/60))
echo $minutes_since_last_commit
}
PATH=$PATH:$HOME/bin
export EDITOR='mvim'
export GIT_EDITOR='mvim'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Prompt Setup
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
PATH=$PATH:$HOME/bin
export EDITOR='mvim'
export GIT_EDITOR='mvim'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Prompt Setup
PATH=$PATH:$HOME/bin
export EDITOR='mvim'
export GIT_EDITOR='mvim'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Prompt Setup
Get back to work...
<section class="l-container">
<ul class="list--vertical">
{{#each project in controller}}
<li>{{project.name}} ({{project.tasks.length}})</li>
{{/each}}
</ul>
</section>