Skip to content

Instantly share code, notes, and snippets.

View t-eckert's full-sized avatar
💭
Head in the cloud

Thomas Eckert t-eckert

💭
Head in the cloud
View GitHub Profile
@mikhailbot
mikhailbot / settings.json
Created May 27, 2020 17:43
GitHub Dark for Windows Terminal
"schemes": [
{
"name" : "GitHub Dark",
"background" : "#24292e",
"black" : "#24292e",
"blue" : "#044289",
"cyan" : "#79b8ff",
"foreground" : "#fafbfc",
"green" : "#28a745",
"purple" : "#6f42c1",
@javilobo8
javilobo8 / download-file.js
Last active April 9, 2024 12:01
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@wojteklu
wojteklu / clean_code.md
Last active May 13, 2024 20:27
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@vasanthk
vasanthk / System Design.md
Last active May 13, 2024 20:43
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active May 9, 2024 19:46
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py