This file contains hidden or 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
function StartService($ServiceName, $Computer){ | |
Write-Output "Getting status of $ServiceName on $Computer" | |
$Service = Get-Service -Name $ServiceName -computername $Computer | |
if($Service.Status -eq "Running"){ | |
Write-Output "$ServiceName is already running on $Computer" | |
} else { | |
Write-Output "Starting $ServiceName on $Computer" | |
$Service.Start() | |
} | |
} |
This file contains hidden or 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
call pathogen#infect() | |
filetype plugin indent on | |
"indentation | |
set tabstop=2 shiftwidth=2 expandtab | |
set cindent | |
set smartindent | |
set autoindent | |
set nowrap | |
set number |
This file contains hidden or 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
cat ~/.ssh/id_rsa.pub | ssh user@server "cat >> .ssh/authorized_keys" |
This file contains hidden or 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
def search_for(resources, criteria={}, exclusions=nil) | |
if(criteria[:from]) | |
date = DateTime.parse(criteria.delete(:from)) | |
criteria[:time_utc.gte] = date | |
end | |
if criteria[:to] | |
date = DateTime.parse(criteria.delete(:to)) | |
criteria[:time_utc.lte] = date+1 # lame but we wanted to make the demo | |
end |
This file contains hidden or 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
<!-- theirs --> | |
<div class="span6"> | |
<label for="lbl-05">First Name</label> | |
<div class="txt-holder"> | |
<input type="text" id="inputEmail" placeholder="Email"> | |
</div> | |
</div> | |
<!-- bootstrap --> | |
<div class="control-group"> |
This file contains hidden or 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
<%= simple_form_for( | |
@child, | |
url: case_children_path(@case) | |
) do |f| %> | |
<section> | |
<header> | |
<h2>New child</h2> | |
</header> | |
<%= f.input :first_name %> |
This file contains hidden or 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
<%= simple_form_for(@user) do |f| %> | |
<div class="form-errors"> | |
<% @user.errors.full_messages.each |msg| %> | |
<div class="error-message"> | |
<%= msg %> | |
</div> | |
<% end %> | |
</div> | |
<% end %> |
This file contains hidden or 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
<%= simple_form_for(@case) %> | |
... | |
<!-- in your fields for one of the spouses --> | |
<%= f.input :title, collection: User.title_options %> | |
... | |
<% end %> |
This file contains hidden or 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 'zeus/rails' | |
require 'dotenv' | |
class CustomPlan < Zeus::Rails | |
def boot | |
Dotenv.load | |
super | |
end | |
end |
This file contains hidden or 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
" highlight trailing whitespace | |
highlight WhitespaceEOL ctermbg=Red guibg=Red | |
match WhitespaceEOL /\s\+$/ | |
" remove whitespace before save | |
autocmd BufWritePre {*.rb,*.js,*.coffee,*.scss,*.haml} :%s/\s\+$//e |