Skip to content

Instantly share code, notes, and snippets.

View escherize's full-sized avatar

bryan escherize

View GitHub Profile
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Bryan.el -- Bryan Maass's emacs cfgs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; theme
(load-theme 'solarized-dark 't)
;; html stuff
(require 'web-mode)
room-dimensions [[15.25 11.25] [11.5 13.5] [12.5 9.75]]
total-sq-ft 1267
price 3635
room-sizes (171.5625 155.25 121.875)
cost-per-sq-foot 3635/1267
common-space 818.3125
common-space-pp 163.6625
area-per-room [498.8875 318.9125 285.5375]
cost-per-room (1431.2991811365428 914.9541732438831 819.2019041041831)
let result: ("1431.30" "914.95" "819.20")
(ns playground.apple
[:require [print.foo :refer :all]])
(defn rent-finder [{:keys [room-dimensions total-sq-ft price] :as apt-info}]
(print-let [room-dimensions room-dimensions
total-sq-ft total-sq-ft
price price
room-sizes (for [[w h] room-dimensions] (* w h))
cost-per-sq-foot (/ price total-sq-ft)
common-space (- total-sq-ft (apply + room-sizes))

ElGetHub

Why el-get?

Problem: Emacs package managment sucks. ELPA breaks your shit. Solution: El-get is the answer, but:

Problem: There’s nowhere to checkout all the cool el-get recipes. Solution: El-Get Hub, a place to share that stuff.

(setq ring-bell-function
(lambda () (message "*beep*"))) ; dont beep outloud, thats rude.

stuff

Interaction design

Create the layout of the interface

Define Interaction patterns best suited in the context

Incorporate user needs collected during User Research, into the designs

Features and Information that are important to the user

Interface behavior like drag-drop, selections, mouse over actions, and so on

Effectively communicate strengths of the system

Make the interface intuitive by building affordances

Maintain consistency throughout the system

CREATE TABLE cogs (
SKU VARCHAR(100),
COST_OF_GOODS_CENTS INTEGER,
UNIQUE (SKU),
PRIMARY KEY (SKU)
);
(defun blend (c1 c2)
(let ((1s (if (= 7 (length c1)) 2 1))
(2s (if (= 7 (length c2)) 2 1)))
(let ((r1 (string-to-number (substring c1 1 (+ 1 (* 1 1s))) 16))
(g1 (string-to-number (substring c1 (+ 1 (* 1 1s)) (+ 1 (* 2 1s))) 16))
(b1 (string-to-number (substring c1 (+ 1 (* 2 1s)) (+ 1 (* 3 1s))) 16))
(r2 (string-to-number (substring c2 1 (+ 1 (* 1 2s))) 16))
(g2 (string-to-number (substring c2 (+ 1 (* 1 2s)) (+ 1 (* 2 2s))) 16))
(b2 (string-to-number (substring c2 (+ 1 (* 2 2s)) (+ 1 (* 3 2s))) 16)))
;; Bryan Maass
;; blending adding subtracting colors in elisp
(defun red (rgb) (car rgb))
(defun green (rgb) (cadr rgb))
(defun blue (rgb) (caddr rgb))
(defun color->rgb (c)
(let ((step (if (= 7 (length c)) 2 1)))
(list (string-to-number (substring c 1 (+ 1 step)) 16)
(string-to-number (substring c (+ 1 step) (+ 1 (* 2 step))) 16)
(setq cider-known-endpoints '(("local-eccentrica-reporting" "127.0.0.1" "5111")
("local-eccentrica-api" "127.0.0.1" "5101")
("local-betelgeuse" "127.0.0.1" "7101")))
(set-face-font 'default "Inconsolata-20")
(fset 'org-jira-link
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([67108925 67108925 23 91 91 104 116 116 112 115 58 47 47 115 116 97 112 108 101 115 108 97 98 115 46 97 116 108 97 115 115 105 97 110 46 110 101 116 47 98 114 111 119 115 101 47 25 93 91 74 105 114 97 32 84 105 99 107 101 116 32 40 25 41 93 93 2] 0 "%d")) arg)))
(global-hl-line-mode -1)