mirror of
https://codeberg.org/franzl96/Knowledgebase.git
synced 2025-10-06 00:12:42 +02:00
Adding new things to the knowledgebase
This commit is contained in:
7
Backend_Java/SpringBoot-JPA (Hibernate).md
Normal file
7
Backend_Java/SpringBoot-JPA (Hibernate).md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
## Logging
|
||||||
|
```
|
||||||
|
spring.jpa.show-sql=true
|
||||||
|
logging.level.org.hibernate.SQL=DEBUG
|
||||||
|
logging.level.org.hibernate.type.descriptor.sql=trace
|
||||||
|
logging.level.org.hibernate.type.descriptor.sql.BasicExtractor=off
|
||||||
|
```
|
3
Backend_Java/_Index_of_Backend_Java.md
Normal file
3
Backend_Java/_Index_of_Backend_Java.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Backend_Java/SpringBoot-JPA (Hibernate)|SpringBoot-JPA (Hibernate)]]
|
||||||
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
2
Codestyle Tipps/Java.md
Normal file
2
Codestyle Tipps/Java.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
- Für Optionals bietet es sich an statt get ein find zu verwenden
|
||||||
|
- Für Read Only sachen immer @Transactional(readOnly = true) verwenden
|
3
Codestyle Tipps/_Index_of_Codestyle Tipps.md
Normal file
3
Codestyle Tipps/_Index_of_Codestyle Tipps.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Codestyle Tipps/Java|Java]]
|
||||||
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| ----------------------------------------------- | ------------------------------------------------------ |
|
| ----------------------------------------------- | ------------------------------------------------------ |
|
||||||
| git rm -rf --cached . | Remove all all files that excluded by .gitignore |
|
|git rm -rf --cached . | Remove all all files that excluded by .gitignore |
|
||||||
| git add -i | Interactive add mode |
|
| git add -i | Interactive add mode |
|
||||||
| git update-index --assume-unchanged \<file\> | Ignore a file like .gitignore with local configuration |
|
| git update-index --assume-unchanged \<file\> | Ignore a file like .gitignore with local configuration |
|
||||||
| git update-index --no-assume-unchanged \<file\> | Unignore a local ignored file |
|
| git update-index --no-assume-unchanged \<file\> | Unignore a local ignored file |
|
||||||
@@ -17,4 +17,4 @@
|
|||||||
| :(exclude)\<file or path\> | Exclude files in commands that using a file path (git add, git log) |
|
| :(exclude)\<file or path\> | Exclude files in commands that using a file path (git add, git log) |
|
||||||
|
|
||||||
## Aliase
|
## Aliase
|
||||||
![[Images/git-alias.png]]å
|
![[Images/git-alias.png]]
|
3
Projektmangagement/Workshop.md
Normal file
3
Projektmangagement/Workshop.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## Methodiken
|
||||||
|
- Event Storming [Link](https://www.mt-itsolutions.com/agile-methoden/event-storming-mit-agiler-methode-die-time-to-market-verkuerzen-und-echte-wettbewerbsvorteile-sichern/)
|
||||||
|
- User Stories
|
3
Projektmangagement/_Index_of_Projektmangagement.md
Normal file
3
Projektmangagement/_Index_of_Projektmangagement.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Projektmangagement/Workshop|Workshop]]
|
||||||
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
48
Shell/SSH zum Schlüsselbund hinzufügen.md
Normal file
48
Shell/SSH zum Schlüsselbund hinzufügen.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
It is not possible to add private key to Keychain, but you can store passphrase for private key in Keychain. On OSX, the native `ssh-add` command has a special argument to save the private key's passphrase in the OSX Keychain, which means that your normal login will unlock it for use with ssh. On OSX Sierra and later, you also need to configure SSH to always use the Keychain (see Step 2 below).
|
||||||
|
|
||||||
|
Alternatively you can use a key without a passphrase, but if you prefer the security that's certainly acceptable with this workflow.
|
||||||
|
|
||||||
|
## Step 1 - Store passphrase in the Keychain
|
||||||
|
|
||||||
|
In the latest version of MacOS (12.0 Monterey), just do this once:
|
||||||
|
|
||||||
|
```
|
||||||
|
ssh-add --apple-use-keychain ~/.ssh/[your-private-key]
|
||||||
|
```
|
||||||
|
|
||||||
|
Or in versions of MacOS older than 12.0 Monterey, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
ssh-add -K ~/.ssh/[your-private-key]
|
||||||
|
```
|
||||||
|
|
||||||
|
Enter your key passphrase, and you won't be asked for it again.
|
||||||
|
|
||||||
|
(If this fails, make sure you are using Apple's version of `/usr/bin/ssh-add` and not something installed with brew etc.; check with `which ssh-add`)
|
||||||
|
|
||||||
|
## Step 2 - Configure SSH-agent to always use the Keychain
|
||||||
|
|
||||||
|
(Note: In versions of OSX prior to Sierra, this is not necessary)
|
||||||
|
|
||||||
|
It seems that OSX Sierra removed the convenient behavior of persisting your keys between logins, and the update to ssh no longer uses the keychain by default. Because of this, you need to change one more thing for secure persistent key storage.
|
||||||
|
|
||||||
|
The solution is outlined in [this github thread comment](https://github.com/lionheart/openradar-mirror/issues/15361#issuecomment-270242512). Here's what you do:
|
||||||
|
|
||||||
|
1. Ensure you've completed Step 1 above to store the passphrase in the keychain.
|
||||||
|
|
||||||
|
2. If you haven't already, create an `~/.ssh/config` file. In other words, in the `.ssh`directory in your home dir, make a file called `config`.
|
||||||
|
|
||||||
|
3. In that `.ssh/config` file, add the following lines:
|
||||||
|
|
||||||
|
```
|
||||||
|
Host *
|
||||||
|
UseKeychain yes
|
||||||
|
AddKeysToAgent yes
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
```
|
||||||
|
|
||||||
|
Change `~/.ssh/id_rsa` to the actual filename of your private key. If you have other private keys in your `~/.ssh` directory, also add an `IdentityFile` line for each of them. For example, I have one additional line that reads `IdentityFile ~/.ssh/id_ed25519` for a 2nd private key.
|
||||||
|
|
||||||
|
The `UseKeychain yes` is the key part, which tells SSH to look in your OSX keychain for the key passphrase.
|
||||||
|
|
||||||
|
4. That's it! Next time you load any ssh connection, it will try the private keys you've specified, and it will look for their passphrase in the OSX keychain. No passphrase typing required.
|
@@ -1,3 +1,4 @@
|
|||||||
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
[[Knowledgebase/Shell/Shell|Shell]]
|
[[Knowledgebase/Shell/Shell|Shell]]
|
||||||
|
[[Knowledgebase/Shell/SSH zum Schlüsselbund hinzufügen|SSH zum Schlüsselbund hinzufügen]]
|
||||||
%% Zoottelkeeper: End of the autogenerated index file list %%
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
||||||
|
3
Tools/Keycloak.md
Normal file
3
Tools/Keycloak.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
- Man kann in Keycloak Custom Methoden definieren, die dann beim Build mit reingezogen werden
|
||||||
|
- Beispiel: Email Provider so umgestalten, dass Mails an eine Adresse geschickt werden (Wegen Development)
|
||||||
|
- so kann man sich einen Mailhog sparen
|
@@ -27,4 +27,7 @@ Counting lines by language
|
|||||||
| fluentd | Collecting all Logs from systems and can used in ELK Stack | #loging |
|
| fluentd | Collecting all Logs from systems and can used in ELK Stack | #loging |
|
||||||
| papaparse | Parsing CSV to and from JSON and etc. | #parser |
|
| papaparse | Parsing CSV to and from JSON and etc. | #parser |
|
||||||
| Iconify | Free Icons | #icons |
|
| Iconify | Free Icons | #icons |
|
||||||
| Storybook | Documenting own HTML Components | #ui |
|
| Storybook | Documenting own HTML Components | #ui |
|
||||||
|
| Glabs | GitLab Bash Client | #todo |
|
||||||
|
| Flameshots | Screenshottools | #todo |
|
||||||
|
| | | |
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Tools/Keycloak|Keycloak]]
|
||||||
[[Knowledgebase/Tools/Tools|Tools]]
|
[[Knowledgebase/Tools/Tools|Tools]]
|
||||||
%% Zoottelkeeper: End of the autogenerated index file list %%
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
||||||
|
88
Web Development/Angular/Testing/Komponententests.md
Normal file
88
Web Development/Angular/Testing/Komponententests.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
- Abgeschlossenes Modul, in dem man die sämtliche Abhängigkeiten manuell auflösen muss um evtl. Störungen zu vermeiden
|
||||||
|
## Bevor der Test ausgeführt werden kann
|
||||||
|
- Der ChangeDetection Mechanismus muss per Hand auf dem Fixture ausgeführt werden
|
||||||
|
- Um die componente aus dem Fixture zu erhalten, muss man nur `fixture.componentInstance` aufrufen;
|
||||||
|
|
||||||
|
## Was bedeutet
|
||||||
|
- Declarations:
|
||||||
|
- Verwendete Komponenten
|
||||||
|
- Providers:
|
||||||
|
- Services
|
||||||
|
## Zugriff auf die Template Komponenten erhalten
|
||||||
|
- Sich die Komponente holen: `fixture.debugElement.query(By.css('.title'));`
|
||||||
|
- Zugriff auf das Element: `const element = debugElement.nativeElement;`
|
||||||
|
- Prüfen: `expect(element.textContent).toEqual('Test');`
|
||||||
|
## Testen des Inputs
|
||||||
|
```typescript
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(TaskItemComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
const task = new Task('Test', false);
|
||||||
|
component.task = task;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly handle input', () => {
|
||||||
|
fixture.detectChanges();
|
||||||
|
const debugElement = fixture.debugElement.query(By.css('.title'));
|
||||||
|
const element = debugElement.nativeElement;
|
||||||
|
expect(element.textContent).toEqual('Test');
|
||||||
|
});
|
||||||
|
```
|
||||||
|
Hier gilt es zu beachten, dass die Werte vor der ChangeDetection gesetzt werden müssen!
|
||||||
|
## Testen des Outputs
|
||||||
|
```typescript
|
||||||
|
it('should correctly handle output', () =>{
|
||||||
|
let taskStatus = false;
|
||||||
|
component.toggled.subscribe((task) =>taskStatus = task.status);
|
||||||
|
|
||||||
|
const debugElement = fixture.debugElement.query(By.css('button')); // Damit kann man sich das passende HTML-Element holen
|
||||||
|
debugElement.triggerEventHandler('click', null); // Damit ist es möglich einen Button zu drücken bzw. ein anders Event anzutriggern
|
||||||
|
expect(taskStatus).toBe(true);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
## Testen eines Asynchronen Services
|
||||||
|
```typescript
|
||||||
|
describe('TaskListComponent', () => {
|
||||||
|
let component: TaskListComponent;
|
||||||
|
let fixture: ComponentFixture < TaskListComponent > ;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
const taskServiceStub = {
|
||||||
|
get() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [TaskListComponent, TaskItemComponent],
|
||||||
|
providers: [{
|
||||||
|
provide: TaskService,
|
||||||
|
useValue: taskServiceStub
|
||||||
|
}]
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(TaskListComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
|
||||||
|
const tasks = [new Task('Test1', false), new Task('Test2', true)];
|
||||||
|
const serviceStub = fixture.debugElement.injector.get(TaskService);
|
||||||
|
spyOn(serviceStub, 'get').and.returnValue(Promise.resolve(tasks)); //asynchrone Aktion abfeuern
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have two children', async(() => {
|
||||||
|
fixture.detectChanges();
|
||||||
|
fixture.whenStable().then(() => { // Warten bis alle Promise Objekte aufgelöst wurden, bevor weitere Tests eingeleitet werden
|
||||||
|
fixture.detectChanges(); // Nochmals Changes Detecten um sicher zu gehen, dass sich die Änderungen auch wirklich ausgewirkt haben
|
||||||
|
const debugElement = fixture.debugElement.queryAll(By.css('li'));
|
||||||
|
expect(debugElement.length).toEqual(2);
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Weitere interessante Themen zum Evaluieren
|
||||||
|
- Wie verhält sich das Asynchrone Testen mit Observables
|
||||||
|
## Weiterführende Links
|
||||||
|
- https://entwickler.de/angular/angular-testing-002
|
3
Web Development/Angular/Testing/_Index_of_Testing.md
Normal file
3
Web Development/Angular/Testing/_Index_of_Testing.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Web Development/Angular/Testing/Komponententests|Komponententests]]
|
||||||
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
3
Web Development/Angular/_Index_of_Angular.md
Normal file
3
Web Development/Angular/_Index_of_Angular.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Web Development/Angular/Testing/_Index_of_Testing|_Index_of_Testing]]
|
||||||
|
%% Zoottelkeeper: End of the autogenerated index file list %%
|
@@ -1,4 +1,5 @@
|
|||||||
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Web Development/Angular/_Index_of_Angular|_Index_of_Angular]]
|
||||||
[[Knowledgebase/Web Development/CSS Tricks/_Index_of_CSS Tricks|_Index_of_CSS Tricks]]
|
[[Knowledgebase/Web Development/CSS Tricks/_Index_of_CSS Tricks|_Index_of_CSS Tricks]]
|
||||||
[[Knowledgebase/Web Development/JavaScript-Type Script Tricks/_Index_of_JavaScript-Type Script Tricks|_Index_of_JavaScript-Type Script Tricks]]
|
[[Knowledgebase/Web Development/JavaScript-Type Script Tricks/_Index_of_JavaScript-Type Script Tricks|_Index_of_JavaScript-Type Script Tricks]]
|
||||||
[[Knowledgebase/Web Development/Tweaks|Tweaks]]
|
[[Knowledgebase/Web Development/Tweaks|Tweaks]]
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
|
||||||
|
[[Knowledgebase/Backend_Java/_Index_of_Backend_Java|_Index_of_Backend_Java]]
|
||||||
|
[[Knowledgebase/Codestyle Tipps/_Index_of_Codestyle Tipps|_Index_of_Codestyle Tipps]]
|
||||||
[[Knowledgebase/Design Inspirations/_Index_of_Design Inspirations|_Index_of_Design Inspirations]]
|
[[Knowledgebase/Design Inspirations/_Index_of_Design Inspirations|_Index_of_Design Inspirations]]
|
||||||
[[Knowledgebase/Docker/_Index_of_Docker|_Index_of_Docker]]
|
[[Knowledgebase/Docker/_Index_of_Docker|_Index_of_Docker]]
|
||||||
[[Knowledgebase/Git/_Index_of_Git|_Index_of_Git]]
|
[[Knowledgebase/Git/_Index_of_Git|_Index_of_Git]]
|
||||||
@@ -7,6 +9,7 @@
|
|||||||
[[Knowledgebase/Mobile App Development/_Index_of_Mobile App Development|_Index_of_Mobile App Development]]
|
[[Knowledgebase/Mobile App Development/_Index_of_Mobile App Development|_Index_of_Mobile App Development]]
|
||||||
[[Knowledgebase/Notes/_Index_of_Notes|_Index_of_Notes]]
|
[[Knowledgebase/Notes/_Index_of_Notes|_Index_of_Notes]]
|
||||||
[[Knowledgebase/Project-Management|Project-Management]]
|
[[Knowledgebase/Project-Management|Project-Management]]
|
||||||
|
[[Knowledgebase/Projektmangagement/_Index_of_Projektmangagement|_Index_of_Projektmangagement]]
|
||||||
[[Knowledgebase/README|README]]
|
[[Knowledgebase/README|README]]
|
||||||
[[Knowledgebase/Recommend Websites|Recommend Websites]]
|
[[Knowledgebase/Recommend Websites|Recommend Websites]]
|
||||||
[[Knowledgebase/Shell/_Index_of_Shell|_Index_of_Shell]]
|
[[Knowledgebase/Shell/_Index_of_Shell|_Index_of_Shell]]
|
||||||
|
Reference in New Issue
Block a user