Skip to content

Instantly share code, notes, and snippets.


Alexander Artemenko svetlyak40wt

View GitHub Profile
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 / 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 / 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-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)
View fixed-transform-function-definer-options.lisp
(defun transform-function-definer-options (options)
(bind ((debug-level (normalize-debug-level
(getf options :debug (max #+sbcl (sb-c::policy-quality sb-c::*policy* 'debug)
(or (production-only* 0)
(when (> debug-level 0)
(remove-from-plistf options :inline :optimize))
(list* :debug debug-level
(remove-from-plist options :debug))))
View covid-19.xlsx
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?><ss:Workbook xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"><ss:Styles><ss:Style ss:Name="Normal" ss:ID="Default"><ss:Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/><ss:Font xmlns:x="urn:schemas-microsoft-com:office:excel" ss:Color="#000000" ss:Size="11" x:Family="Swiss" ss:FontName="Arial"/></ss:Style><ss:Style ss:Parent="Default" ss:ID="String"><ss:NumberFormat ss:Format="@"/></ss:Style><ss:Style ss:Parent="String" ss:ID="Notes"><ss:Font xmlns:x="urn:schemas-microsoft-com:office:excel" ss:Color="#666666" ss:Size="9" x:Family="Swiss" ss:FontName="Arial"/></ss:Style><ss:Style ss:Parent="String" ss:ID="HyperLink"><ss:Font ss:Underline="Single" ss:Color="#0000FF"/></ss:Style><ss:Style ss:Parent="Default" ss:ID="ShortDate"><ss:NumberFormat ss:Format="Short Date"/></ss:Style><ss:Style ss:Parent="Default" ss:ID="Currency"><ss:NumberFormat ss:Format="_(&quot;$&quot;* #,##0.00_);_(&quot;$&quot;* (#,##0.00);_(&quot;$&quot;*
svetlyak40wt / breadcrumbs.lisp
Last active Mar 12, 2020
A spinneret breadcrumbs example.
View breadcrumbs.lisp
(defvar *breadcrumbs*)
(defun render-breadcrumbs ()
(loop for (text . url) in *breadcrums*
do (:li (:a :href url