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 +e | |
RAILS_ENV=test bundle exec rake db:schema:load | |
bundle exec rspec spec/models/arm/create_line_items_visit_spec.rb:57 | |
test_result=$? | |
echo Test complete | |
git checkout HEAD Gemfile.lock | |
exit $test_result |
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
public class Payment { | |
private int _accountID; | |
private int _userID; | |
private decimal _paymentAmount; | |
/* I realize this looks almost like it should be a FI, but | |
that would just distract from the point */ | |
public void OnAccount(int id) { | |
_accountID = id; |
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 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="My WPF UI" Height="300" Width="300"> | |
<StackPanel Margin="5"> | |
<StackPanel> | |
<Label Content="Prename:" /> | |
<TextBox x:Name="preName" MinWidth="50"/> | |
</StackPanel> | |
<StackPanel> | |
<Label Content="Surename:" /> |
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
(-> means references) | |
WebProject -> ServiceStack 3.9.32 -> ServiceStack.Text 3.9.32 | |
Using 'Manage nuget packages for solution' I add ServiceStack to my test project and wind up with | |
TestProject -> ServiceStack 3.9.32 -> ServiceStack.Text 3.9.38 | |
#WTF!!! |
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
def add(x, y) | |
x + y | |
end | |
it 'adds' do | |
# does this anti-pattern have a name? | |
add(1, 2).must_equal(1 + 2) | |
end | |
#vs |
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
import StartApp.Simple as StartApp | |
import Mouse | |
import Html exposing(..) | |
import Html.Attributes exposing(style,attribute) | |
import Html.Events exposing(..) | |
import Signal exposing(..) | |
main = | |
StartApp.start { model = model, view = view, update = update } |
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
import Html exposing (text) | |
type alias ID = Int | |
type alias Minute = Int | |
f : ID -> Int | |
f x = x * 2 | |
g : Minute -> Bool | |
g x = if x > 10 then True else False |
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
[Route("/helloservice/alive")] | |
[Service(1,RestrictAccessTo = EndpointAttributes.Xml | EndpointAttributes.HttpGet)] | |
public class Alive {} |
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
public class NonMinifyingJavascript : IBundleTransform | |
{ | |
public void Process(BundleContext context, BundleResponse bundle) | |
{ | |
if(bundle == null) | |
{ | |
throw new ArgumentNullException("bundle"); | |
} | |
context.HttpContext.Response.Cache.SetLastModifiedFromFileDependencies(); |
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
public class A { | |
public A() { | |
_b = new B(); | |
} | |
} |