Skip to content

Instantly share code, notes, and snippets.

View jakebrinkmann's full-sized avatar

Jake Brinkmann jakebrinkmann

View GitHub Profile

This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
@vasanthk
vasanthk / System Design.md
Last active July 1, 2025 18:19
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?
@whophil
whophil / jupyter.service
Last active October 8, 2024 00:42 — forked from doowon/jupyter_systemd
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py
@ls-avanier
ls-avanier / issue_template.txt
Last active February 12, 2022 00:26
Jira Issue Template
h3. Description
*As a* _<type of user>_,
*I want* _<to perform some task>_,
*so that I can* _<achieve some goal/benefit/value>_.
h3. CoS
* It MUST use tech
* It SHOULD allow feelings

Functions are data-flow time machines

Today data-flow diagrams are something every CS student and programmer has seen. It is a nice way of visualizing the general flow of data through an application. But it is rarely more than that. A few reasons for this might be an inconvenience in displaying details. They tend to get big!

Another problem is the rather limited language which is incapable of describing some fundamental ideas of CS like lambda functions. Would you know how to draw a lambda function in a data-flow diagram? If you ever heard of string diagrams, you might be able to do so, but most programmers wouldn't recognize them.

I myself adore data-flow diagrams and I'm fascinated by what you can do with them even in an functional setting. That's why I want to show you, how you can build lambda functions in a data-flow diagram in a functional way and what this has to do with time machines. But first lets start with some simple examples to get used to functional data-flow diagrams. Here we have a rat

Defining data structures in data-flow diagrams

We have seen, how we can define functions in data flow diagrams, but can we go further and define complex data structures using only the essential language elements of data-flow diagrams. Well as it turns out: yes, you can define algebraic data types in a day to day data-flow diagram and I want to show you how it is done.

But first a note on algebraic data types (ADT). If you don't know what those are, don't feel bad, they are rather simple. I will first show you how we define ADTs and what their benefits are, before I will introduce them into data-flow diagrams. If this seems rather odd, why would anybody want to do this, I can tell you, that it taught me a lot about the structure of data and how they work hand in hand with functions. I hope to also discuss how to create a powerful meta-language and the requirements to create those are so fundamental, that they apply to every language even our data-flow language.

So let's start with a simple definition of

@pjf
pjf / .taskrc
Created December 5, 2017 00:05
pjf's .taskrc file
# [Created by task 2.5.1 2/19/2017 04:19:13]
# Taskwarrior program configuration file.
# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color',
# 'man task-sync' or 'man taskrc'
# Here is an example of entries that use the default, override and blank values
# variable=foo -- By specifying a value, this overrides the default
# variable= -- By specifying no value, this means no default
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
@je55ek
je55ek / immutable_json.py
Created January 26, 2018 04:38
Function to create an immutable data structure and its associated marshmallow schema in one fell swoop
from collections import namedtuple
from marshmallow import Schema
from marshmallow.decorators import post_load
def class_and_schema(class_name, fields):
"""Create a class and its marshmallow schema.
Example::
@Falkor
Falkor / bugwarriorrc
Created July 18, 2018 13:17
bugwarriorrc template document
# bugwarriorrc -- Configuration file for Bugwarrior (see https://bugwarrior.readthedocs.io)
##############################################################################
# General stuff.
[general]
targets = gitlab.<domain>, github.com
# If unspecified, the default taskwarrior config will be used.
#taskrc = /path/to/.taskrc
@djmitche
djmitche / @@INTRO.md
Last active June 3, 2025 12:16
My use of Taskwarrior

Getting Started

My Usage

I've been using this for almost ten years now, so here are some of the ways I have set it up to be most productive. See my taskrc below for implementation details.

In general, I've had the most success by keeping lists of tasks short and to the point, avoiding the anxiety of seeing 100 tasks and feeling like I'm going to drown.