Skip to content

Instantly share code, notes, and snippets.

View laxika's full-sized avatar
💻
Working...

Gyula Lakatos laxika

💻
Working...
View GitHub Profile
import org.springframework.stereotype.Service;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Base64;

@Service

https://docs.spring.io/spring-boot/docs/current/reference/html/

  • Introduction to Spring Boot
    • What is it
      • Radically faster to develop with
      • Opinionated out of the box
      • Without code generation or XML
      • Most of the time used for web development but can be used to develop command line applications too
    • System requirements
  • Spring Boot 1.x -> Java 7

Basics

What is a datacenter? What tasks do we have there?

  • Easy to scale or adopt to new requirements.
  • Handling peak performance is easier.
  • Less infrastructure bulls**t because the interaction with the hardware layer is minimized.

Why AWS is good, when to use?

  • Wouldn’t put bank application on it (for a good reason).
  • Simple to use/develop on.
  • Speed up the development time with a lots of available plug & play services.

Optimizations

Disable query cache

https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-cache.html

CreateIndexRequestBuilder cirb = new CreateIndexRequestBuilder(esTransportClient.admin().indices()).setIndex(index);
ImmutableSettings.Builder indexSettings = ImmutableSettings.settingsBuilder();
indexSettings.put("analysis.analyzer.default.type", "cjk");
cirb.setSettings(indexSettings);

Disable the _all field

107*44 (kicsit nagy csipoben)
@laxika
laxika / TOC.md
Last active November 30, 2016 19:45
  • What is Daggers & Sorcery
  • Items
    • Identification
    • Rarity
    • Type
      • Recipes
      • Materials
      • Weapons
      • Armors
  • Skills
@laxika
laxika / gist:7170b33a2c456e6d3927
Last active May 3, 2017 03:46
Vultr CoreOS cloud-config.yaml
#!/bin/bash
V4_PRIVATE_IP=`curl http://169.254.169.254/current/meta-data/local-ipv4`
V4_PUBLIC_IP=`curl http://169.254.169.254/current/meta-data/public-ipv4`
cat > "cloud-config.yaml" <<EOF
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEApv0BQSB1G1TsjKsvzREQfOjv0d+a8hHojk0oJ5B/Aue7Swp0rUN8JViAd91OSGUdAkwy3A/hJ4PoumnwrQlQTGK+JZto7kWONsPSzaBe0SJldOFXdJdiY71ZsT/CIsZgosA2dzDYuUZlo3i9FWTlmg71bJu2JnHq5Z5cWXLV7syPXLvIDcrOzCwUOHWxolYWFUdQPY6w44eg6VhYq+Q3V9Q1NCls0OuLe+k/AjsE6udoFmJai3RHnEVZPNiZz+jKtZXgbsPbH8BSlc1LauRXJBviKU9WF1OXot0FTfRP2H958R9fKvCS5kIOACtFGZUISnYHGH85nnpTNkILICsSlw==
write_files: