Skip to content

Instantly share code, notes, and snippets.


Alexander Artemenko svetlyak40wt

View GitHub Profile
svetlyak40wt / get-lisp-dependencies.lisp
Last active Feb 17, 2021
A helper to gather all lisp system's dependencies
View get-lisp-dependencies.lisp
(ql:quickload :fset)
(defun get-dependencies (system)
"Returns a set with all dependencies of a given system.
System should be loaded first."
(labels ((normalize (name)
(etypecase name
(string (string-downcase name))
(symbol (normalize (symbol-name name)))
svetlyak40wt / svn-blame-stats.lisp
Created Jan 22, 2021
A short script to calculate how many lines belong to each SVN commiter
View svn-blame-stats.lisp
(defpackage #:blame-stats
(:use #:cl))
(in-package blame-stats)
(ql:quickload '(alexandria cl-fad str lparallel)
:silent t)
(defun merge-hash-table-into (left right)
"Merges values from right hash map into the left"
svetlyak40wt / travis-badges.lisp
Last active Jan 20, 2021
A generator for Travis Matrix badges.
View travis-badges.lisp
;; Run (ql:quickload :cl-yaml) before loading this script
(defpackage #:travis-badges
(:use #:cl)
(:import-from #:cl-yaml)
(in-package travis-badges)
svetlyak40wt / lw-current-lang.lisp
Created Dec 12, 2020
An example how to get user's preferred language on OSX and Windows using LispWorks.
View lw-current-lang.lisp
(defun current-language ()
(let ((lang (objc:with-autorelease-pool ()
(objc:invoke "NSUserDefaults" "standardUserDefaults")
"objectForKey:" "AppleLanguages")
"objectAtIndex:" 0))))
;; 2019-04-29
svetlyak40wt / weblocks-toast.lisp
Last active Dec 31, 2020 — forked from bamboospirit/weblocks toast.lisp
weblocks simple toast effect (common lisp web framework ui frontend)
View weblocks-toast.lisp
(ql:quickload '(:weblocks :weblocks-lass :weblocks-navigation-widget :weblocks-ui :find-port))
(defpackage app-package
(:use #:cl
(:import-from #:parenscript #:ps #:chain)
(:import-from #:weblocks-navigation-widget #:defroutes)
(:import-from #:weblocks/routes #:reset-routes)
(:import-from #:weblocks/session #:*session*)
svetlyak40wt / russian.vim
Created Sep 19, 2012
A part of Vim config to switch between Russian and English keymaps.
View russian.vim
nnoremap <Leader>r :set keymap=russian-jcuken<CR>
nnoremap <Leader>e :set keymap=<CR>
inoremap <Leader>r <ESC>:set keymap=russian-jcuken<CR>a
inoremap <Leader>e <ESC>:set keymap=<CR>a
svetlyak40wt /
Created Jan 20, 2020
Спусковые крючки по Дорофееву в формате для Org Mode

Спусковые крючки для очистки мозга

Как пользоваться картой

  1. Карта помогает выгрузить из головы все задачи
  2. Пройдитесь взглядом по всем разделам карты
  3. Если в голове “сидит” задача, то она обязательно всплывёт при взгляде на соответствующий узел
  4. Выписывайте задачи, пока их количество не достигнет 50
  5. Почувствуйте, как гора упала с ваших плеч :)

При составлении карты использовались материалы Максима Дорофеева,


svetlyak40wt / weblocks-autocomplete.lisp
Created Sep 24, 2020
Example of autocompletion box using Weblocks
View weblocks-autocomplete.lisp
;; This example illustrates how to call actions from JS and update the widget in response.
;; It is incomplete but could be refactored into reusable library.
;; Hope, somebody will do this some day.
(defpackage #:weblocks-autocomplete
(:use #:cl))
(in-package weblocks-autocomplete)
(ql:quickload '(weblocks log4cl))
svetlyak40wt /
Created Sep 14, 2020
Test for Jinja2 performance on Python2.7
# Test for this post:
Python 2.7.16 (default, Apr 17 2020, 18:29:03)
Type "copyright", "credits" or "license" for more information.
IPython 5.10.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
View lack-server-side-events.lisp
;; This example was created to help the author of this thread:
;; Before loading this code, do this in the REPL:
;; (ql:quickload '(log4cl spinneret clack lack))
(defpackage #:server-side
(:use #:cl))
(in-package server-side)