Skip to content

Instantly share code, notes, and snippets.


Anton Kovalenko akovalenko

View GitHub Profile

Keybase proof

I hereby claim:

  • I am akovalenko on github.
  • I am akovalenko ( on keybase.
  • I have a public key ASA795wj16fJpsxUF1rKW2UKDFmvYqc9JE29OIgsDf9n_Qo

To claim this, I am signing this object:

akovalenko / cl-pg-as-minimal-test.lisp
Last active August 29, 2015 14:11
Minimal parse / execute / row-reader demo for cl-postgres-async
View cl-pg-as-minimal-test.lisp
(in-package :cl-postgres-async)
;;(defparameter *test-connection* '("test" "test" "" "localhost"))
(defvar *test-connection* '("test" "test" "" "localhost"))
(defun prompt-connection (&optional (list *test-connection*))
(flet ((ask (name pos)
(format *query-io* "~a (enter to keep '~a'): " name (nth pos list))
(finish-output *query-io*)
(let ((answer (read-line *query-io*)))
View gist:ea8033d65e9948f94e6c
(defvar *ru-vowels* "аоуыэяёюие")
(defun vowelp (character) (position character *ru-vowels*))
(defun move-vowels (n &optional (input *standard-input*) (output *standard-output*))
(let ((vowels 0))
(let ((character (read-char input nil :eof)))
(when (eq :eof character)
akovalenko / watch-xi2.c
Created January 23, 2013 13:13
Watch-xi2 looks for X Window System events that occur when input device hierarchy changes in any way (e.g. when a keyboard or a mouse is connected or disconnected). It may take a single parameter: a shell command to run on the hierarchy change events.
View watch-xi2.c
/* (c) Copyright 2010 Anton Kovalenko <>.
LICENSE:Do what you want with this software, but don't blame me.
Compile it with gcc -lX11 -lXi.
#define WATCH_XI2_TIMESTAMP "Time-stamp: <2010-08-14 19:39:55 anton>"
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
#include <X11/Xutil.h>
#include <stdio.h>
View controlc.lisp
(in-package "SB-THREAD")
(define-alien-routine ("SetConsoleCtrlHandler" set-console-ctrl-handler) int
(callback (function (:stdcall int) int))
(enable int))
(defun windows-console-control-handler (event-code)
(case event-code
(flet ((interrupt-it ()