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
PS1d1='$( ret=$? ; dol="\$ \[\e[0m\]" ; test $ret -gt 0 && dol="\[\e[1;91m\]\$ \[\e[0m\]" ; echo $dol)' | |
PS1='[\u@\h \[\033[01;34m\]\W\[\033[00m\]]'$PS1d1 |
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
set guifont=Monospace\ 10 | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set shiftround " Shift to the next round tab stop | |
set wrap | |
set linebreak | |
set autoindent |
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
" local syntax file - set colors on a per-machine basis: | |
" vim: tw=0 ts=4 sw=4 | |
" Vim color file | |
" Maintainer: Jason Porritt | |
" Last Change: Jan. 24, 2008 | |
hi clear | |
set background=dark | |
if exists("syntax_on") | |
syntax reset |
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
[When("I choose a photo to upload")] | |
public void UploadImageFor() | |
{ | |
// Where Browser is your current Browser object | |
var fileUpload = Browser.FileUpload(x => x.Name == "Photo"); | |
var assembly = Assembly.GetExecutingAssembly(); | |
var fileStream = assembly.GetManifestResourceStream(assembly.GetName().Name + ".TestData.image.jpg"); | |
var fileData = new byte[fileStream.Length]; | |
fileStream.Read(fileData, 0, fileData.Length); |
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
initialize: -> | |
_.bindAll(this, 'render', 'close') | |
this.model.bind('change', this.render) | |
this.model.view = this | |
render: -> | |
$(this.el).html(this.template(this.model.toJSON())) | |
this.setContent() | |
return this |
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
initialize: -> | |
this.model.bind('change', this.render) | |
this.model.view = this | |
render: => | |
$(this.el).html(this.template(this.model.toJSON())) | |
this.setContent() | |
return this |
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
initialize: -> | |
@model.bind('change', this.render) | |
@model.view = this | |
render: => | |
$(@el).html(this.template(@model.toJSON())) | |
this.setContent() | |
return this |
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
window.TodoView = Backbone.View.extend | |
tagName: "li" | |
template: _.template($('#item-template').html()) | |
events: | |
"click .check" : "toggleDone", | |
"dblclick div.todo-content" : "edit", | |
"click span.todo-destroy" : "clear", | |
"keypress .todo-input" : "updateOnEnter" |
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
class window.TodoView extends Backbone.View | |
tagName: "li" | |
template: _.template($('#item-template').html()) | |
events: | |
"click .check" : "toggleDone" | |
"dblclick div.todo-content" : "edit" | |
"click span.todo-destroy" : "clear" | |
"keypress .todo-input" : "updateOnEnter" |
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
using System.Linq; | |
public static class EnumerableUtils { | |
// First item, or throw 404 exception | |
public static TSource FirstOr404<TSource>(this IEnumerable<TSource> source) | |
{ | |
try | |
{ | |
return source.First(); |
OlderNewer