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
package org.yourcompany.test; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.SortedSet; | |
import javax.sql.DataSource; |
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 CustomerRepository extends AbstractDAO<Customer> { | |
public CustomerRepository(SessionFactory sessionFactory) { | |
super(sessionFactory); | |
} | |
public List<Customer> getAll() { | |
return list(namedQuery(Customer.QUERY_ALL)); | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am sch3lp on github. | |
* I am sch3lp (https://keybase.io/sch3lp) on keybase. | |
* I have a public key whose fingerprint is 6A5E A0B7 A502 BCC7 B04D 768C FB9E E221 BB80 CEF6 | |
To claim this, I am signing this object: |
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
'use strict'; | |
angular.module('twitchSmartTvApp', ['twitchServices']) | |
.config(function ($routeProvider) { | |
$routeProvider | |
.when('/', { | |
templateUrl: 'main.html', | |
controller: function ($scope, Streams) { | |
$scope.streams = Streams.getAll(); | |
} |
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
package be.schelp.example; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.joda.time.DateMidnight; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import be.schelp.test.FreezeDateRule; | |
public class FileFormatterTest { |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
@RunWith(MockitoJUnitRunner.class) | |
public class SettlementMockitoTest { | |
@Test | |
public void settlement_WhenMoreSettlersAssignedToDefenseThanAmountOfRaiders_CanDefendItself() throws Exception { | |
Raiders raiders = mock(Raiders.class); | |
when(raiders.getAmountOfRaiders()).thenReturn(1); | |
Settler defender = mock(Settler.class); | |
Settler farmer = mock(Settler.class); |
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
module Tests exposing (..) | |
import Test exposing (..) | |
import Expect | |
all : Test | |
all = | |
describe "sortBy tests" | |
[ dafuq ] |
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
// https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
val primes: Sequence<Int> = sequence { | |
var numbers = generateSequence(2) { it + 1 } | |
while (true) { | |
val prime = numbers.first() | |
yield(prime) | |
numbers = numbers | |
.drop(1) | |
.filter { it % prime != 0 } |
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 java.util.Objects; | |
public class ValidationError { | |
private final String error; | |
private ValidationError(final String error) { | |
this.error = error; | |
} | |
public static ValidationError from(final String error) { |
OlderNewer