Skip to content

Instantly share code, notes, and snippets.

View sizovs's full-sized avatar
🌴
Mentoring software developers @ principal.dev

Eduards Sizovs sizovs

🌴
Mentoring software developers @ principal.dev
View GitHub Profile
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;
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;
"If you have the right attitude, interesting problems will find you" - Eric Raymond
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" {
### 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:
// 1. Fix bad naming.
class ShoppingCart {
UUID getShopingCartId() { ... }
boolean checkFreeShippingEligibility() { ... }
void removeOrderItem(OrderItem orderItem) { ... }
void addOrderItem(OrderItem orderItem) { ... }
Collection<OrderItem> getOrderItems() { ... }
}
module.exports = controller => {
controller.on('user_channel_join', (bot, message) => {
bot.reply(message, `Hello, ${message.user}`);
});
}
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.')
}
const request = require("request");
module.exports = controller => {
controller.on('slash_command', (bot, message) => {
if (message.command != "/pic") {
return;
}
const request = require("request");
module.exports = controller => {
controller.on('slash_command', (bot, message) => {
if (message.command != "/pic") {
return;
}