Skip to content

Instantly share code, notes, and snippets.

View holsee's full-sized avatar
💭
elixir'n and rust'n all the things

Steven Holdsworth holsee

💭
elixir'n and rust'n all the things
View GitHub Profile
// Rates
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_lagcompensation "1"
//MOTD
cl_disablehtmlmotd "1"
@holsee
holsee / gist:e521c2d3f195a4b46b91
Last active February 1, 2020 13:09
PC Rig Notes

PC Build Notes

Motherboard

ASUS X99-A

  • £172.25

Processor

Keybase proof

I hereby claim:

  • I am holsee on github.
  • I am holsee (https://keybase.io/holsee) on keybase.
  • I have a public key whose fingerprint is B22C EBB5 D360 3B89 265C 49A5 AA49 BBFF 734A E473

To claim this, I am signing this object:

@holsee
holsee / sjt
Created March 17, 2015 14:00
Find All Permutations of List
defmodule Sjt do
def perms([]), do: [[]]
def perms(l = [_h|_t]) do
for h <- l, t <- perms(l -- [h]), do: [h|t]
end
end
@holsee
holsee / btree.ex
Last active January 11, 2020 13:17
BTree in Elixir
defmodule BTree do
defstruct tree: nil
def new(e), do: %BTree{tree: {e, nil, nil}}
def insert(%BTree{tree: root}, element) do
%BTree{tree: do_insert(root, element)}
end
defp do_insert(nil, element) do
@holsee
holsee / gist:a3fe468c47b2a4764975
Last active August 29, 2015 14:05
valid Soduku
function getBox(board, x, y) {
var from = x * 3;
var to = from + 3;
var target = y * 3;
return board[0+target].slice(from, to)
.concat(board[1+target].slice(from, to))
.concat(board[2+target].slice(from, to))
}
@holsee
holsee / classes.sc
Created May 26, 2014 13:19
Scala class organisation
// PACKAGES
//commented out to get ws to run
//package foo
object bar {
}
class bam {
@holsee
holsee / rationalsws.sc
Created May 26, 2014 12:11
Rationals Worksheet
import scala.annotation.tailrec
val x = new Rational(1, 3)
val y = new Rational(5, 7)
val z = new Rational(3, 2)
x.numer
x.denom
x - y - z
@holsee
holsee / gist:5336517
Last active December 15, 2015 22:59
I'm no expert but this is how I would use modules instead of IoC container.
class Nails
def to_s
"nails"
end
end
class Glue
def to_s
"glue"
end