Skip to content

Instantly share code, notes, and snippets.

View Swoorup's full-sized avatar
🎲
Focusing

Swoorup Joshi Swoorup

🎲
Focusing
View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@mythz
mythz / taxOfUs.fs
Created September 22, 2011 21:26
Calculate a tax rates using F#
let taxOf salary taxRates =
((0m,0)::taxRates, taxRates)
||> Seq.zip
|> Seq.map(fun ((_, prevBand),(rate, band)) -> (prevBand, rate, band))
|> Seq.sumBy(fun (prevBand, rate, band) ->
match salary with
| x when x < prevBand -> 0m
| x when x > band -> decimal(band - prevBand) * rate
| x -> decimal(x - prevBand) * rate
)
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@Swoorup
Swoorup / sapaths.py
Last active August 29, 2015 14:27 — forked from l1am9111/sapaths.py
Python GTA: SA Path Reader
from struct import unpack
from cStringIO import StringIO
class SAPath():
def __init__(self, node):
self.path = StringIO(open(node, "rb").read())
self.header = {}
self.pathnodes = []
self.navinodes = []
self.links = []
@postandcourier
postandcourier / r-geocoder.r
Created August 26, 2016 14:17
Geocoding large dataset in R
# Script to geocode many items
# Modified by J Emory Parker
# Aug 25 2016
# Based on script originally by Shane Lynn
# http://www.shanelynn.ie/massive-geocoding-with-r-and-google-maps/
#load up the ggmap library
library(ggmap)
# get the input data

Understanding Kubernetes in 10 minutes

This document provides a rapid-fire overview of Kubernetes concepts, vocabulary, and operations. The target audience is anyone who runs applications in a cloud environment today, and who wants to understand the basic mechanics of a Kubernetes cluster. The goal is that within 10 minutes, managers who read this should be able to listen in on a Kubernetes conversation and follow along at a high level, and engineers should be ready to deploy a sample app to a toy cluster of their own.

This orientation doc was written because the official Kubernetes docs are a great reference, but they present a small cliff to climb for newcomers.

If you want to understand why you should consider running Kubernetes, see the official Kubernetes conceptual overview document. This document is intended to complement that one, but one layer deeper.

For a deep dive, see [Kubernetes concepts](https://kubernetes.io/docs/co

@ckelner
ckelner / kubernetes_overview.md
Last active April 9, 2024 20:04 — forked from WintersMichael/kubernetes_overview.md
Understanding Kubernetes in 10 minutes - By Mike Schuette

Understanding Kubernetes in 10 minutes

Original document can be found here; written by Mike Schuette.

This document provides a rapid-fire overview of Kubernetes concepts, vocabulary, and operations. The target audience is anyone who runs applications in a cloud environment today, and who wants to understand the basic mechanics of a Kubernetes cluster. The goal is that within 10 minutes, managers who read this should be able to listen in on a Kubernetes conversation and follow along at a high level, and engineers should be ready to deploy a sample app to a toy cluster of their own.

This orientation doc was written because the official Kubernetes docs are a great reference, but they present a small cliff to climb for newcomers.

If you want to understand why you should consider running Kubernetes, see the official Kubernetes conceptual overview document. This doc

@graninas
graninas / haskell_approaches_comparison_table.md
Last active April 25, 2024 20:49
Haskell Approaches Comparison Table

An Opinionated Comparison of Software Design Approaches in Haskell

| | Raw IO | Free Monads; Church Encoded Free Monads | Final Tagless / mtl | Effect Systems | ReaderT

@Horusiath
Horusiath / Program.fs
Last active December 26, 2023 12:21
A simple Reliable Causal Broadcast implementation using F# and Akka.NET
module Program =
type InMemoryDb(replica: ReplicaId) =
let snapshot = ref null
let mutable events : Map<uint64,obj> = Map.empty
interface Db with
member _.SaveSnapshot state = async { snapshot := (box state) }
member _.LoadSnapshot<'s>() = async {
match !snapshot with
@Horusiath
Horusiath / Effect.fs
Created September 19, 2020 04:58
Inferred dependency injection over async bindings.
open System
[<Struct>] type Effect<'env, 'out> = Effect of ('env -> Async<'out>)
[<RequireQualifiedAccess>]
module Effect =
/// Create value with no dependency requirements.
let inline value (x: 'out): Effect<'env,'out> = Effect (fun _ -> async.Return x)
/// Create value which uses depenendency.