Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Making Ultralisp.org

Alexander Artemenko svetlyak40wt

💭
Making Ultralisp.org
View GitHub Profile
@svetlyak40wt
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
svetlyak40wt / jinja2-python2.7.py
Created Sep 14, 2020
Test for Jinja2 performance on Python2.7
View jinja2-python2.7.py
# Test for this post:
# https://40ants.com/lisp-project-of-the-day/2020/09/0188-zenekindarl.html
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:
;; https://www.reddit.com/r/Common_Lisp/comments/hu019r/what_is_the_recommended_way_to_readunderstand/
;; 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)
1))))))
(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
svetlyak40wt / breadcrumbs.lisp
Last active Mar 12, 2020
A spinneret breadcrumbs example.
View breadcrumbs.lisp
(defvar *breadcrumbs*)
(defun render-breadcrumbs ()
(with-html
(:ul
(loop for (text . url) in *breadcrums*
do (:li (:a :href url
text))))))
@svetlyak40wt
svetlyak40wt / html-test.lisp
Last active Mar 12, 2020 — forked from xh4/html-test.lisp
Common Lisp HTML Generation Test
View html-test.lisp
(in-package :cl-user)
(ql:quickload :cl-who)
(ql:quickload :spinneret)
(defpackage :html-test
(:use :cl :cl-who :spinneret))
(in-package :html-test)
View gamekit-profile.txt
CL-USER> (sb-sprof:with-profiling (:mode :time
:threads :all
:reset t
:report :flat)
(gamekit:start 'hello-gamekit
:log-level :error
:blocking t))
Profiler sample vector full (11,762 traces / approximately 499,999 samples), doubling the size
Number of samples: 12462
@svetlyak40wt
svetlyak40wt / triggers.org
Created Jan 20, 2020
Спусковые крючки по Дорофееву в формате для Org Mode
View triggers.org

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

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

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

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

Учёба

@svetlyak40wt
svetlyak40wt / gh-stats.lisp
Created Mar 16, 2019
Collects github status.
View gh-stats.lisp
(defpackage #:gh-stats/stats
(:use #:cl)
(:import-from :dexador)
(:import-from :log4cl)
(:import-from :local-time)
(:import-from :cl-arrows
:->)
(:import-from :link-header)
(:import-from :jonathan)
(:import-from :cl-strings))
You can’t perform that action at this time.