Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash wildfly-install.sh
#tested-version :10.0.0.CR3
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@aspineon
aspineon / rest-api-cheatsheet.md
Created June 15, 2020 09:04 — forked from jahe/rest-api-cheatsheet.md
REST API Cheatsheet

REST API Cheatsheet

Source: https://www.youtube.com/watch?v=5WXYw4J4QOU

  • POST, GET, PUT, DELETE != CRUD
  • no verbs -> just nouns for Resources: /applications or /applications/123
  • Possible Responses: Collection of Resources (e.g. with Links) or One instance of a Resource
  • Keep your API course grained to be scaleble to future requirements
  • For Resources: Be as specific as possible: /customers vs. /newsletter-customers and /registered-customers
  • PUT for Create: Can be used when the Client has the ability to create an identifier for the Resource himself. But it has to contain a full replacement of the dataset: PUT /applications/123
@aspineon
aspineon / software-engineering.md
Created June 15, 2020 09:04 — forked from jahe/software-engineering.md
Software Engineering

Software Engineering

Continous Integration vs. Continous Delivery vs Continous Deployment

  • Continous Integration (CI)
    • Code is built + Unit/Integration tested on every check-in
    • Tests are executed on an environment that is downscaled in comparison to the production environment
    • Build artifacts are stored in a version controlled artifact repository
    • Build artifacts of a successful build are automatically deployed on a test environment
    • ... now you are ready for the next Step: Continous Delivery
  • Continous Delivery (CDel)
  • Your application is deployable every time
@aspineon
aspineon / microservices-cheatsheet.md
Created June 15, 2020 09:04 — forked from jahe/microservices-cheatsheet.md
Microservices Cheatsheet

Glossar

  • Sidecar - Process that encapsulates required technologies (e.g. logging, monitoring, service discovery, etc.) in the microservices environment and makes them available to microservices that are not able to use those technologies natively
  • Immutable Server -

Configuration + Coordination

  • Zookeeper - https://zookeeper.apache.org/ - Provides configs in a hierarchical key-value store that is replicated and synchronized across large distributed systems.
  • etcd - https://github.com/coreos/etcd - Like Zookeeper. Distributed reliable key-value store for the most critical data of a distributed system. Provides a REST API. It is possible to do locking in a distributed system with it.
  • Spring Cloud Config - Provides a REST API. Config files can be based in a Git repo. The config data can be encrypted (e.g. for passwords in config files)

Service Discovery

@aspineon
aspineon / macos-cheatsheet.sh
Created June 15, 2020 08:22 — forked from jahe/macos-cheatsheet.sh
macOS Cheatsheet
# Move cursor to the beginning of the line
^+a
# Move cursor to the end of the line
^+e
# Delete from cursor to the beginning of the line
^+u
# Delete from cursor to the end of the line
@aspineon
aspineon / python-cheatsheet.py
Created June 15, 2020 08:21 — forked from jahe/python-cheatsheet.py
Python Cheatsheet
# All values are considered "truthy" except for the following, which are "falsy":
None
False
0
0.0
0j
Decimal(0)
Fraction(0, 1)
[] - an empty list
# Generate a safe password with node.js
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
@aspineon
aspineon / go-cheatsheet.go
Created June 15, 2020 08:18 — forked from jahe/go-cheatsheet.go
Go Cheatsheet
// Simple function
func add(x int, y int) int {
return x + y
}
// Function that returns 2 values
func swap(x string, y string) (string, string) {
return y, x
}
@aspineon
aspineon / jpa-cheatsheet.java
Created June 15, 2020 08:16 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();