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
package lv.craftsmans; | |
import org.junit.Rule; | |
import org.springframework.beans.factory.config.AutowireCapableBeanFactory; | |
import org.springframework.test.context.TestContext; | |
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; | |
import org.springframework.util.ReflectionUtils; | |
import java.lang.reflect.Field; |
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
package lv.craftsmans; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.model.Statement; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; |
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
"If you have the right attitude, interesting problems will find you" - Eric Raymond |
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
variable "public_key_path" { | |
default = "~/.ssh/terraform.pub" | |
} | |
resource "aws_key_pair" "auth" { | |
key_name = "terraform-key" | |
public_key = "${file(var.public_key_path)}" | |
} | |
resource "aws_security_group" "default" { |
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
### Keybase proof | |
I hereby claim: | |
* I am eduardsi on github. | |
* I am eduardsi (https://keybase.io/eduardsi) on keybase. | |
* I have a public key whose fingerprint is 7C60 9C8E 1779 D373 4859 47C7 6626 82BD 94B2 2363 | |
To claim this, I am signing this object: |
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
// 1. Fix bad naming. | |
class ShoppingCart { | |
UUID getShopingCartId() { ... } | |
boolean checkFreeShippingEligibility() { ... } | |
void removeOrderItem(OrderItem orderItem) { ... } | |
void addOrderItem(OrderItem orderItem) { ... } | |
Collection<OrderItem> getOrderItems() { ... } | |
} | |
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
module.exports = controller => { | |
controller.on('user_channel_join', (bot, message) => { | |
bot.reply(message, `Hello, ${message.user}`); | |
}); | |
} |
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
module.exports = controller => { | |
controller.hears(['^say (.*)','^say'], 'direct_mention', (bot, message) => { | |
const thingToSay = message.match[1]; | |
if (thingToSay) { | |
bot.reply(message, thingToSay); | |
} else { | |
bot.reply(message, 'I will repeat whatever you say.') | |
} |
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
const request = require("request"); | |
module.exports = controller => { | |
controller.on('slash_command', (bot, message) => { | |
if (message.command != "/pic") { | |
return; | |
} | |
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
const request = require("request"); | |
module.exports = controller => { | |
controller.on('slash_command', (bot, message) => { | |
if (message.command != "/pic") { | |
return; | |
} | |