Skip to content

Instantly share code, notes, and snippets.


Jannik Hell jahe

View GitHub Profile
jahe /
Last active Mar 21, 2021
Web Application - Best Practices
jahe /
Last active Aug 4, 2020
GraphQL Cheatsheet

Essential quotes

  • "GraphQL is about asking for specific fields on objects"
  • "The query has exactly the same shape as the result"
  • "Clients can fetch lots of related data in one request, instead of making several roundtrips in a classic REST architecture"
  • "GraphQL queries look the same for both single items or lists of items"
  • "In REST, you can only pass a single set of arguments but in GraphQL, every field and nested object can get its own set of arguments, making GraphQL a complete replacement for making multiple API fetches"
  • "While query fields are executed in parallel, mutation fields run in series, one after the other"


  • Type
jahe / go-cheatsheet.go
Last active Jun 15, 2020
Go Cheatsheet
View go-cheatsheet.go
// 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
jahe / typescript-cheatsheet.ts
Last active Mar 21, 2021
TypeScript Cheatsheet
View typescript-cheatsheet.ts
// Activate the family of strict options
// You can then selectively opt out with specific strict options set to false
// Properties in ES6 classes should be initialized
// It checks weather one of the following conditions evaluatest to true:
// * has a type that includes undefined
// * has an explicit initializer
// * is definitely assigned to in the constructor

Container Definition within Task Definition

memory and memoryReservation - The memory setting is a hard limit. If the containers memory usage hits this amount, the container will be terminated. If on the other hand, you specify memoryReservation, that much memory will be reserved for the task, but it can use more, up to the total amount of the machine. Only one of memory and memoryReservation are required. If both are used, memoryReservation should be less than memory. If you are only going to specify one of these, I'd recommend memoryReservation, as it will allow your task to use up to the total memory on the machine.

jahe /
Last active Jun 15, 2020
Python Cheatsheet
# All values are considered "truthy" except for the following, which are "falsy":
Fraction(0, 1)
[] - an empty list
View svg-cheatsheet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
jahe /
Created Sep 27, 2018
Key / Password Generation Cheatsheet
# Generate a safe password with node.js
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
jahe /
Created Aug 18, 2018
Resilient Software Design


  • Nutzer bekommt nichts davon mit (bester Fall)
  • Anwendung läuft in einem definierten, reduzierten Service-Level weiter

Ziele von Software, damit sie einen Geschäftswert erzielt

  • Muss in Produktion laufen
  • Muss ordnungsgemäß funktionieren (Verfügbarkeit)

Verfügbarkeit = MTTF / (MTTF + MTTR)

# Split vertically
# Split horizontally
# Navigate between panes
# Toggle maximizing the current pane (full screen)