Skip to content

Instantly share code, notes, and snippets.

View chriskaukis's full-sized avatar

Chris chriskaukis

View GitHub Profile
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
//
// FreeDrawingImageView.swift
//
// Created by Besher on 2018-12-30.
// Copyright © 2018 Besher Al Maleh. All rights reserved.
//
import UIKit
class FreeDrawingImageViewDrawLayer: UIView {
@wrabit
wrabit / _bootstrap_bulma_helpers.scss
Last active September 8, 2020 17:21
Bootstrap style responsive helper utilities for Bulma
/*
Start Bootstrap style responsive spacer helper
Utilities for spacing, text and float
*/
$spacer: 1rem !default;
$spacers: () !default;
$spacers: map-merge((
@bradtraversy
bradtraversy / django_deploy.md
Last active April 4, 2024 11:28
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@nicbet
nicbet / _Webpack-Fontawesome-Bootstrap-Phoenix.md
Last active April 28, 2020 05:43
Sass versions of Bootstrap 4 and Fontawesome 5 with Elixir / Phoenix Framework 1.3.x and 1.4.x using Webpack

SASS Versions of

  • Fontawesome 5
  • Bootstrap 4

in Phoenix 1.3 and 1.4 via Webpack

@areinisc
areinisc / README.md
Last active September 3, 2018 13:20
PHOTOMETRY --- doom-emacs -- automatic theme adjustment based on ambient light

Adding automatic light/dark theme switching to doom-emacs running on a mac with ambient light sensor.

Idea adapted from: Matt Bilyeu https://matthewbilyeu.com/blog/2018-04-09/setting-emacs-theme-based-on-ambient-light

Installation

  1. Make the lmutracker executable using clang and place it in your custom doom directory:
    $ cd ~/.doom.d/    # start in your custom doom directory, wherever that is for you.
    

$ touch lmutracker.mm # copy in the contents of this file however you like

@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"
@vasanthk
vasanthk / System Design.md
Last active April 23, 2024 08:08
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?
@Wunkolo
Wunkolo / compact.cpp
Last active March 15, 2023 02:36
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const