Skip to content

Instantly share code, notes, and snippets.

@nathanlippi
nathanlippi / gist:3609840
Created September 3, 2012 14:50
Problem -- Old board being remembered for (play-game)
(defvar *player-symbol* '(" " "X" "O")) ;; Strictly used for display
;; (defmacro setk (list keyword value)
;; `(setf (getf ,list ,keyword) ,value))
(defun display-board(board)
(loop for row in board do
(display-row row)
(format *query-io* "~%")))
(defun tmux-display-message(arg)
(s-trim-right (shell-command-to-string (format "tmux display-message -p '#%s'" arg))))
(defun tmux-get-current-session-name() (tmux-display-message "S"))
(defun tmux-get-current-window-number() (tmux-display-message "I"))
(defun tmux-get-current-pane() (tmux-display-message "P"))
(defun tmux-get-runner-pane()
"Get # of current pane, and then use that to guess the # of the runner/term pane.
@nathanlippi
nathanlippi / gist:5923326
Last active December 5, 2022 23:14
Emacs + Tmux integrated window movement
;; Many thanks to the author of and contributors to the following posts:
;; https://gist.github.com/mislav/5189704
;; http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits
;;
;; TODO: Make a script that generates tmux and emacs code without duplication
;;
;; NOTE: My keybindings are not the default emacs ones, using windmove
;; Try to move direction, which is supplied as arg
;; If cannot move that direction, send a tmux command to do appropriate move
var bot_bet_at_beginning_of_jackpot_if_jackpot_is_small = setInterval(
function()
{
/* Wait for beginning of round */
socket.once("round_new", function() {
var amt_satoshis = 500;
var amt_btc = to_btc(amt_satoshis);
/* Don't bet unless if 'size' is too big */
if(typeof currentStats.size !== "undefined" && currentStats.size >= amt_satoshis)
<?php
/**
* Resume in PHP
*
* @author: Nathan Lippi <nathan.lippi@gmail.com>
*
*/
class ResumeConcrete extends AbstractResume
{