Skip to content

Instantly share code, notes, and snippets.

View jahe's full-sized avatar

Jannik Hell jahe

View GitHub Profile
@jahe
jahe / iterm2-cheatsheet.sh
Created July 13, 2018 07:04
iTerm2 Cheatsheet
# Split vertically
⌘+D
# Split horizontally
⌘+Shift+D
# Navigate between panes
⌘+⌥+Arrow
# Toggle maximizing the current pane (full screen)
@jahe
jahe / macos-cheatsheet.sh
Last active June 15, 2020 08:22
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
@jahe
jahe / enzyme-cheatsheet.js
Last active June 3, 2022 01:18
Enzyme Cheatsheet
// Show rendered HTML
const wrapper = shallow(<App />)
console.log(wrapper.debug())
// Disable lifecycle methods of react within tests
const wrapper = mount(<App />, { disableLifecycleMethods: true })
// Assert number of occurrences
expect(wrapper.find('p').length).toBe(1)
@jahe
jahe / react-cheatsheet.md
Last active March 13, 2019 08:19
React Cheatsheet

TypeScript

https://github.com/sw-yx/react-typescript-cheatsheet

Error Boundaries

Lifecycle method componentDidCatch() for catching every error in the component or subcomponent rendering In React <16 the UI stayed untouched when such an error happend But in React >=16 the Component is getting unmounted from the UI completely when there is no componentDidCatch() which results in a blank page

componentDidCatch receives 2 arguments:

@jahe
jahe / ssh-cheatsheet.sh
Created January 11, 2018 08:52
SSH Cheatsheet
# Generate Private/Public-Keypair for SSH on Windows with Cmder
ssh-keygen -t rsa
@jahe
jahe / maven-cheatsheet.md
Last active January 29, 2021 18:50
Maven Cheatsheet

Maven Cheatsheet

Show unused dependencies

mvn dependency:analyze

Show infos to one specific plugin (available goals with phases, etc.)

mvn help:describe -Dplugin=org.sonarsource.scanner.maven:sonar-maven-plugin -Ddetail
@jahe
jahe / rest-api-cheatsheet.md
Last active April 12, 2022 06:30
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
@jahe
jahe / software-engineering.md
Last active June 15, 2020 09:04
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
@jahe
jahe / aws-cheatsheet.md
Last active October 12, 2017 21:14
AWS Cheatsheet

Datenschutz - EU Datenschutz-Grundverordnung (EU-DSGVO)

Verschlüsselung

Die neue EU-DSGVO (EU-Datenschutz-Grundverordnung - tritt ein am 25.05.2018) fordert, dass Kundendaten verschlüsselt gespeichert werden. Und zwar so, dass nur der Urheber (also man als Unternehmen selbst und nicht der Cloud-Anbieter) Zugriff auf die Kundendaten hat. Man muss also die alleinige Gewalt über ihre Daten garantieren.

Data in Motion vs. Data at Rest

  • Encryption in Motion dient dazu, Daten während der Übertragung (z.B. Hochladen von Daten auf S3 oder Abfragen von Daten im RDS) zu verschlüsseln.
  • Werden Daten verschlüsselt gespeichert, sind diese Encrypted at Rest. Daten, die in S3, RDS oder einem anderen persistenten Datenspeicher gespeichert sind, sollten in der Regel verschlüsselt werden. Für Data at Rest Verschlüsselung gibt es zwei Möglichkeiten:
  • Clientseitige Verschlüsselung - Der Admin verschlüsselt die Daten vor dem Absenden, anstatt sie in AWS zu verschlüsseln. Er kümmert sich um den Versc
@jahe
jahe / arkit-cheatsheet.md
Last active September 26, 2017 21:41
ARKit Cheatsheet

Facts

  • ARKit is supported on A9 and higher capable devices
  • 60 frames per second
  • Either poll for information or use the available session update delegates

Rendering Technologies

  • SpriteKit - 2D
  • SceneKit - 3D
  • Metal - Low Level Rendering