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
<%= 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( | |
@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
<!-- 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
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
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
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
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
select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn | |
from sys.foreign_key_columns as fk | |
inner join sys.tables as t on fk.parent_object_id = t.object_id | |
inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id | |
where fk.referenced_object_id = (select object_id from sys.tables where name = 'PriorAuthorizationRequests') | |
order by TableWithForeignKey, FK_PartNo |
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
# Regular expression to require the following | |
# Thanks to Scott Chamberlain on Stack Overflow | |
# http://stackoverflow.com/questions/3721843 | |
# All ASCII printing characters | |
# At least 8 characters in length | |
# At least 1 lowercase letter | |
# At least 1 uppercase letter | |
# At least 1 special character | |
# No white-space characters | |
# At least 1 number |