Skip to content

Instantly share code, notes, and snippets.

@andineck
andineck / map.ts
Created April 10, 2021 13:07
typescript
View map.ts
interface Option {
key: string;
label: string;
}
const results = [
{ k: "1", l: 1 },
{ k: "2", l: 2 },
];
@andineck
andineck / 0-README.md
Last active September 21, 2021 00:24
retropie bluez sixaxis shanwan PS3 controller bluetooth connection
View 0-README.md

shawnwan ps3 controller bluetooth connection problem fix

if your ps3 controller just vibrates when connecting to the retropie, or when your ps3 controller does not connect via bluetooth, this writedown might help you.

Since no exact description did work for me, I decided to write it down, what I did based on other descriptions, in order to get it to work.

links

@andineck
andineck / assemble.js
Created May 25, 2016 07:18
assemble javascript template strings
View assemble.js
// code from http://stackoverflow.com/questions/29771597/how-can-i-construct-a-template-string-from-a-regular-string
// + handling unlimited arguments
function assemble(literal, params) {
var args = [].slice.apply(arguments)
args.shift()
return new Function(args, "return `"+literal+"`")
}
@andineck
andineck / 0_readme.md
Last active May 8, 2018 03:47
database messaging distributed kafka
View 0_readme.md

database, messaging, distributed system, kafka

@andineck
andineck / mongo-db.md
Last active January 12, 2016 06:49
spring notes, mongodb
View mongo-db.md

http://docs.spring.io/spring-data/mongodb/docs/1.5.4.RELEASE/reference/html/mapping-chapter.html

6.3.1 Mapping annotation overview

The MappingMongoConverter can use metadata to drive the mapping of objects to documents. An overview of the annotations is provided below

  • @Id - applied at the field level to mark the field used for identiy purpose.
  • @Document - applied at the class level to indicate this class is a candidate for mapping to the database. You can specify the name of the collection where the database will be stored. @Document(collection = "collectionName")
  • @DBRef - applied at the field to indicate it is to be stored using a com.mongodb.DBRef.
  • @Indexed - applied at the field level to describe how to index the field.
@andineck
andineck / README.md
Last active January 20, 2024 21:20
Authentication and Authorization Concepts for MicroServices
View README.md

auth with microservices

Authorization and Authentication are hard. when you only have to implement them once (as you do within a monolith) instead of over and over again, it makes the developer happy :-), and maybe leads to less implementation failures.

When you have a bunch of microservices, this is something that has to be considered.

Implement it once or in every microservice, or something in between?

@andineck
andineck / java.sh
Created November 3, 2015 09:49
Java Ubuntu Version
View java.sh
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java8-installer
# choose java version
sudo update-alternatives --config java