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:
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; | |
} |
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 |
(defmacro lazy (&body exprs) | |
`(lambda () ,@exprs)) | |
(defmacro deflazy (name &body exprs) | |
`(defvar ,name (lazy ,@exprs))) |
(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))) |
;;;; 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 |
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 |
I hereby claim:
To claim this, I am signing this object:
package eu.wausoft.lex | |
import java.lang.{String => JString} // renames the built-in string to JString to avoid token clashing | |
trait Token | |
case class String(value: JString) extends Token | |
case class Number(value: JString) extends Token | |
case class Atom(value: JString) extends Token | |
case class Keyword(value: JString) extends Token | |
case object Unknown extends Token |
package eu.wausoft.city.gen | |
import scala.util.Random | |
import java.io._ | |
/** | |
* Created by coffee on 3/8/16. | |
*/ | |
object Generator { | |
val prefixes = Vector ( | |
"Alt", "Alten", "Olden", "Groß", "Großen", "Hoh", "Hohen", |
function touch-cpp { | |
for file in "$@" | |
do | |
cpp="$file.cpp" | |
hpp="$file.hpp" | |
# only actually attempt to write the files if they don't exist. | |
if [ -f $cpp -o -f $hpp ] | |
then | |
echo ">> Either $cpp or $hpp already exist, no action taken." |