Skip to content

Instantly share code, notes, and snippets.

@Faheetah
Faheetah / Dockerfile
Last active October 19, 2022 15:22
Docker patterns/anti-patterns
### Generic Dockerfile demonstrating good practices
### Imports
# Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better
FROM ubuntu:latest
# Better, using a small image since our app has no dependency on Ubuntu
FROM alpine:3.3
@vasanthk
vasanthk / System Design.md
Last active May 31, 2024 01:39
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?
@hezhao
hezhao / django_cmd.sh
Last active May 1, 2024 07:22
Django Commands Cheatsheet
# Use Python 3 for easy unicode
$ virtualenv -p python3 .env
$ source .env/bin/activate
$ pip install django
$ deactivate
# Start new django project and app
$ django-admin.py startproject mysite
$ ./manage.py migrate
$ ./manage.py createsuperuser
@ThomasBurleson
ThomasBurleson / BarChart.js
Last active October 9, 2019 15:13
Reusable Chart component for D3 - using prototypes and factories
(function() {
// Based on article @ http://www.toptal.com/d3-js/towards-reusable-d3-js-charts
// Publish a factory method for Chart instances
// @usage:
// var runningChart = BarChart.instanceOf( {barPadding : 2 } );
// var weatherChart = BarChart.instanceOf()
// .fillColor('coral');
window.BarChart = {
@PH111P
PH111P / relalgSql.hs
Last active October 7, 2019 09:35
Haskell: relational algebra to SQL converter
import Data.Char --for ord (Char -> Int)
data Query = Relation (String,[String]) -- (Relationenname, [Attributname])
| Projection [String] Query -- [Attributname]
| Selection String Query -- Bedingung
| Rename [(String,String)] Query -- [(alter Attributname, neuer Attributname)]
| Union Query Query
| Difference Query Query
| Product Query Query
deriving Show
@hmartiro
hmartiro / zeromq-vs-redis.md
Last active April 14, 2024 20:33
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@jbcrail
jbcrail / gdsii.lua
Last active August 21, 2020 11:45
Simple GDSII parser
-- A basic GDSII reader that reads from standard input and writes serialized
-- text to standard output
local gdsii = {}
gdsii.types = {
[0] = "HEADER",
[1] = "BGNLIB",
[2] = "LIBNAME",
[3] = "UNITS",
@itamarhaber
itamarhaber / index.html
Last active March 29, 2019 02:26
Red is Beautiful: A Visualization of Redis Commands
<!DOCTYPE html>
<!--
Red is Beautiful: A Visualization of Redis Commands
By Itamar Haber, Redis Labs
Adopted from Mike Bostock's Zoomable Pack Layout example: http://mbostock.github.io/d3/talk/20111116/pack-hierarchy.html
!-->
<html>
<head>
<style>
@staltz
staltz / introrx.md
Last active May 30, 2024 18:43
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\