I hereby claim:
- I am electriccoffee on github.
- I am electriccoffee (https://keybase.io/electriccoffee) on keybase.
- I have a public key ASDbnWk4-Tm2Q_smSjp-SX48kAlYBVgtoshqMiTDFnOWPwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| module ECUtils where | |
| -- applies a function f to a string | |
| -- the string gets picked apart, modified, then stitched back together | |
| mapWords :: (String -> String) -> String -> String | |
| mapWords f = unwords . map f . words | |
| -- port of Scala's function of the same name, | |
| -- returns the default value 'e' if Nothing | |
| getOrElse :: Maybe a -> a -> a |
| ;;;; stumpwm config file | |
| (load "~/lib/stump-swank-setup.lisp") | |
| (in-package :stumpwm) | |
| (setq window-format "[%s] %t") | |
| ;; turn mode-line on for current head | |
| (enable-mode-line (current-screen) (current-head) t |
| (defun dot->png (fname thunk) | |
| (with-open-file | |
| (*standard-output* | |
| fname | |
| :direction :output | |
| :if-exists :supersede) | |
| (funcall thunk)) | |
| (sb-ext:run-program "/opt/local/bin/dot" (list "-Tpng" "-O" fname))) |
| (defmacro lazy (&body exprs) | |
| `(lambda () ,@exprs)) | |
| (defmacro deflazy (name &body exprs) | |
| `(defvar ,name (lazy ,@exprs))) |
| import Control.Monad.State | |
| type Bound = (Int, Int) -- left is the lower bound, right is the upper | |
| -- starting values | |
| initial :: Bound | |
| initial = (1, 100) | |
| -- decrement integer | |
| dec :: Int -> Int |
| void DirectionOnKeypress(System.Func<KeyCode, bool> fn, KeyCode targetCode, Vector3 vector, float multiplier, float cap) | |
| { | |
| var directionalVelocity = Vector3.Dot(rigidbody.velocity, vector); | |
| if (fn(targetCode) && directionalVelocity <= cap) | |
| rigidbody.velocity += vector * multiplier; | |
| } |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Utilities | |
| { | |
| static class Pair | |
| { | |
| public static Pair<T1, T2> Make<T1, T2>(T1 fst, T2 snd) |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include "list.h" | |
| DEFINE_LIST(int); /* defines the int_list type */ | |
| int main(void) { | |
| int_list *lst = EMPTY; | |
| PUSH(8, &lst, int_list); | |
| PUSH(4, &lst, int_list); |
| /* Navn: Nikolaj Lepka | |
| Email: [email protected] | |
| Gruppe: A425b | |
| Studieretning: Datalogi */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #define DAYSIZE 4 | |
| #define TEAMSIZE 4 |