Skip to content

Instantly share code, notes, and snippets.

(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. "
(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))))
@rothgar
rothgar / install-tmux
Last active April 5, 2023 06:53 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# 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
@dmytro
dmytro / ssh-multi.sh
Created October 31, 2012 03:46
Start multiple synchronized SSH connections with Tmux
#!/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