This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns user) | |
(defn reached-top-of-staircase? | |
"Tests to make sure the steps get us to the top of the stairway." | |
[{:keys [stairway-height]} step-vec] | |
(= stairway-height (apply + step-vec))) | |
(defn compute-max-steps | |
"The idea here is that the maximum number of steps we could take is the | |
stairway height divided by the smallest step. " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns example.nrepl | |
(:require [clojure.tools.nrepl.server :refer [start-server stop-server]] | |
[cider.nrepl :refer [cider-nrepl-handler]]) | |
(:gen-class)) | |
(defn -main [port] | |
(let [port (Integer. port)] | |
(defonce server (start-server :port port :handler cider-nrepl-handler)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install tmux on Centos release 6.5 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |