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
Feature: Loose Guids | |
Scenario: Sample loose guid | |
Given the account repository has the following accounts | |
| Id | LastName | | |
| 1 | Galt | | |
| 2 | Roark | | |
When I press the delete account '1' button | |
Then I should have the following accounts | |
| Id | LastName | |
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
<% Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> | |
<%@ Import Namespace="System.Linq" %> | |
<% | |
var items = ViewData.ModelMetadata.AdditionalValues["SelectList"] as IList<SelectListItem>; | |
<select id="<%=ViewData.ModelMetadata.PropertyName %>" name="<%=ViewData.ModelMetadata.PropertyName %>" <%=(ViewData.ModelState.ContainsKey(ViewData.ModelMetadata.PropertyName) && ViewData.ModelState[ViewData.ModelMetadata.PropertyName].Errors.Any()) ? "class=\"input-validation-error\"" : string.Empty %>> | |
<%foreach (var item in items) | |
{%> | |
<option value="<%=HttpUtility.HtmlEncode(item.Value)%>" <%=item.Value == ViewData.Model.ToNullSafeString() ? " selected" : ""%>> | |
<%=Html.Encode(item.Text)%></option> |
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(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=123)}([function(t,e,i){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){e.__esModule=!0;var o=i(169),n=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.c |
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
########################################## | |
# To run: | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
########################################## | |
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
fi |
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
void Main() | |
{ | |
It_should_return_the_name_from_the_person_on_the_invoice_on_the_order(); | |
It_should_return_nothing_if_the_person_is_not_set(); | |
It_should_return_nothing_if_the_invoice_is_not_set(); | |
It_should_return_nothing_if_given_nothing(); | |
} | |
public static string GetNameFrom(Order order) | |
{ |
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
using System; | |
namespace VMSandbox | |
{ | |
class AModel | |
{ | |
public DateTime Date { get; set; } = DateTime.UtcNow; | |
public int MyLifeForTheCodeDownloads { get; set; } = Int32.MaxValue; | |
} |
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
# https://github.com/banzsolt/wargaming_api/ | |
wargaming_api git:(master) bundle exec irb | |
2.0.0-p647 :001 > WargamingApi::Accounts | |
NameError: uninitialized constant WargamingApi::Accounts | |
from (irb):1 | |
from /Users/darrencauthon/.rvm/rubies/ruby-2.0.0-p647/bin/irb:12:in `<main>' | |
2.0.0-p647 :002 > require_relative 'lib/wargaming_api' | |
accounts -> Players loaded. |
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
using System; | |
using AutoMoq.Helpers; | |
using Moq; | |
using NUnit.Framework; | |
namespace JamesDemo | |
{ | |
public class Presenter | |
{ | |
private readonly IRepository repository; |
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
class ViewModel | |
def initialize subject | |
@subject = subject | |
end | |
def method_missing meth, _, _ | |
@subject.send meth | |
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
`git branch --merged` | |
.split("\n") | |
.map { |x| x.gsub('*', '') | |
.strip }.select { |x| x != 'master' } | |
.each do |b| | |
`git branch -d #{b}` | |
end | |
`git branch --merged`.split("\n").map { |x| x.gsub('*', '').strip }.select { |x| x != 'master' }.each { |b| `git branch -d #{b}` } |
NewerOlder