Skip to content

Instantly share code, notes, and snippets.

View jwinder's full-sized avatar

Joe Winder jwinder

  • Jack Henry & Associates
  • Iowa
  • 00:57 (UTC -06:00)
View GitHub Profile
package eip
trait Functor[F[_]] {
def fmap[A, B](f: A => B): F[A] => F[B]
}
trait Pointed[F[_]] {
def point[A](entity: => A): F[A]
}
import XMonad
import XMonad.Util.Run
import XMonad.Util.EZConfig
import XMonad.Actions.CycleWS
import XMonad.Actions.SpawnOn
import Data.Monoid
--import qualified Data.Map as M
--import Control.Monad
--import Control.Comonad
--import System.Environment
16:04 <rubbish> java.lang.BrainStackOverflowException: Grip 1.3
16:04 <rubbish> at cerebal.cortex (CerebalCortex.java:923)
16:04 <rubbish> at ventral.stream (Procssing.java:6)
16:04 <rubbish> at visual.perception (Perception.java:2094)
16:04 <rubbish> at eyes.face (Eyes.java:1240)
16:04 <rubbish> at 5.senses (Senses.java:231)
;; Create non-existent directories containing a new file before saving
(add-hook 'before-save-hook
(lambda ()
(when buffer-file-name
(let ((dir (file-name-directory buffer-file-name)))
(when (and (not (file-exists-p dir))
(y-or-n-p (format "Directory %s does not exist. Create it?" dir)))
(make-directory dir t))))))
(defun ssh-copy-id (username host)
(interactive "sUsername: \nsHost: ")
(shell-command (format "ssh-copy-id %s@%s" username host)))
(defun mine-set-font-size (size)
(interactive "sSize: ")
(let ((font (concat "Monaco " size)))
(set-frame-parameter (selected-frame) 'font font)
(add-to-list 'default-frame-alist (cons 'font font))))
@jwinder
jwinder / gist:6780758
Created October 1, 2013 15:57
rcirc-font-faces
(custom-set-faces
'(rcirc-my-nick ((t (:foreground "#00ffff"))))
'(rcirc-other-nick ((t (:foreground "#90ee90"))))
'(rcirc-server ((t (:foreground "#a2b5cd"))))
'(rcirc-server-prefix ((t (:foreground "#00bfff"))))
'(rcirc-timestamp ((t (:foreground "#7d7d7d"))))
'(rcirc-nick-in-message ((t (:foreground "#00ffff"))))
'(rcirc-prompt ((t (:foreground "#00bfff")))))
@jwinder
jwinder / gist:8522372
Created January 20, 2014 15:45
hipchat.el
(require 'mine-jabber)
;; Username & nickname fields from https://banno.hipchat.com/account/xmpp
(setq hipchat-username "")
(setq hipchat-nickname "")
(setq hipchat-password "")
(setq hipchat-autojoin-rooms
'("aggregation" "assets" "banno_talk" "banno_cms" "data_services" "emacs" "grip" "kernel" "southen" "troll_talk" "webdev" "design_talk"))
@jwinder
jwinder / gist:8639211
Created January 26, 2014 20:41
Emacs -- filtering out echoed message patterns
(setq echo-area-silenced-patterns '("Desktop saved"
"Auto saving"
"No changes need to be saved"
"You can run the command"))
(defadvice message (before ignorable-message activate compile)
"Do not echo any messages matching a pattern in `echo-area-silenced-patterns`."
(let ((current-echo (current-message))
(incoming-echo (apply 'format (cons format-string args))))
(when (member-if '(lambda (pattern) (search pattern incoming-echo)) echo-area-silenced-patterns)
@jwinder
jwinder / gist:9126666
Created February 21, 2014 00:47
yolo
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaQAAAGkCAIAAADxLsZiAAAHqUlEQVR42u3VUQ0AIQxEwVrBf3CCnApARL+anc1TANxcnXcVWAfP7WdWjgB2sBPsBDvYCXaCHewEO8EOdoKdYAc7wU6wg51gJ9jBTrAT7GAn2Al2sIOdYAc7wU6wg51gJ9jBTrAT7GAn2Al2sBPsBDvYCXaCHewEO8EOdoKdYAc72Al2sBPsBDvYCXaCHewEO8EOdoKdYAc7wU6wg51gJ9jBTrAT7GAn2Al2sIOdYAc7wU6wg51gJ9jBTrAT7GAn2Al2sBPsBDvYCXaCHewEO8EOdoKdYOcBwE6wg51gJ9jBTrAT7GAn2Al2sBPsBDvYCXaCHewEO8EOdoKdYAc7wU6wE+wEO9gJdoId7AQ7wQ52gp1gBzvBTrCDnWAn2MFOsBPsYCfYCXawE+xgBzvBTrCDnWAn2MFOsBPsYCfYCXawE+wEO9gJdoId7AQ7wQ52gp1gBzvBDnawE+wEO9gJdoId7AQ7wQ52gp1gBzvBTrCDnWAn2MFOsBPsYCfYCXawE+xgBzvBTrCDnWAn2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