Skip to content

Instantly share code, notes, and snippets.

@druska
druska / engine.c
Created September 17, 2018 15:18
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 13:56
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@idbrii
idbrii / botw-cedec2017.md
Last active May 7, 2024 13:54
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@slykar
slykar / docker-compose-hackintosh.md
Last active May 7, 2024 13:53
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active May 7, 2024 13:53
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@jasonpincin
jasonpincin / vmmv
Created February 13, 2013 16:42
Moves a SmartOS VM to a different SmartOS host
#!/usr/bin/bash
# Moves a SmartOS VM to a different host
# This script stops the VM, sends it to the target host,
# imports it on the target host, and starts it on the
# target host. It is your responsibility to remove it on
# the origin host after confirming the script worked as
# expected.
#
# Usage:
@malteneuss
malteneuss / Dockerfile
Created April 28, 2022 19:43
Nextjs + Prisma DB (query and migrations) in Docker
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
@wojteklu
wojteklu / clean_code.md
Last active May 7, 2024 13:47
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

@Nora-Ballard
Nora-Ballard / Set-WindowState.ps1
Last active May 7, 2024 13:46
Hide, Show, Minimize, Maximize, etc window from Powershell.
function Set-WindowState {
param(
[Parameter()]
[ValidateSet('FORCEMINIMIZE', 'HIDE', 'MAXIMIZE', 'MINIMIZE', 'RESTORE',
'SHOW', 'SHOWDEFAULT', 'SHOWMAXIMIZED', 'SHOWMINIMIZED',
'SHOWMINNOACTIVE', 'SHOWNA', 'SHOWNOACTIVATE', 'SHOWNORMAL')]
[Alias('Style')]
[String] $State = 'SHOW',
[Parameter(ValueFromPipelineByPropertyname='True')]