Skip to content

Instantly share code, notes, and snippets.

View nimaai's full-sized avatar

Matus Kmit nimaai

  • www.zhdk.ch
  • Zurich
View GitHub Profile
@nimaai
nimaai / macro-pitfalls.md
Last active February 4, 2024 21:37
Lisp macro pitfalls
call plug#begin()
Plug 'nvim-tree/nvim-tree.lua'
Plug 'nvim-tree/nvim-web-devicons'
call plug#end()
@nimaai
nimaai / todo-list.md
Last active December 1, 2020 17:43
leihs release todo list.md
  • export MAJOR_VERSION=...
  • export GIT_TAG=...
  • export GIT_TAG_SUB="leihs-$GIT_TAG"
  • export RC_TAG=...
  • git branch v/$MAJOR_VERSION-staging origin/master
  • git switch --recurse-submodules v/$MAJOR_VERSION-staging
  • git pull origin v/$MAJOR_VERSION-staging
  • git fetch --recurse-submodules
  • git merge origin/master
  • vim config/releases.yml

Keybase proof

I hereby claim:

  • I am nimaai on github.
  • I am nimaai (https://keybase.io/nimaai) on keybase.
  • I have a public key ASDICWrD8tv55Dv57AxtvPh7uO-dRzuC9vvs2KNOlVmE8wo

To claim this, I am signing this object:

@nimaai
nimaai / tbos-3rd.md
Last active December 16, 2016 21:27
The Book of Shen (3rd edition)

Mistakes:

  • p.165 Figure 14.6 should be:
(10-) (aor+ [(first) [[(tuple) a] b]])
a
(11-) (aor+ [(first) [[(tuple) a] b]])
b
  • p.166 Figure 14.7
@nimaai
nimaai / react-autocomplete-leihs-todos.md
Last active July 13, 2016 11:54
react-autocomplete leihs TODOs
  • type in something => autocomplete menu appears => hover over some item to have it highlighted => click again in the input field => onClickHandler gets fired, whereas it should not in this case
  • when one scrolls inside the "Templates" section in the autocomplete menu => then the whole page scrolls and the menu gets detached from the input field
  • style the subsections in such a way that the user sees that he can scroll there
  • loading icon either for all or even better for each subsection
-- BEST
-- "HashAggregate (cost=478.98..478.99 rows=1 width=67) (actual time=0.159..0.159 rows=1 loops=1)"
SELECT DISTINCT media_entries.*
FROM media_entries
INNER JOIN meta_data md1 ON (md1.media_entry_id = media_entries.id AND md1.string ILIKE '%Tigernase%')
INNER JOIN meta_data md2 ON md2.media_entry_id = media_entries.id
INNER JOIN meta_data_keywords ON meta_data_keywords.meta_datum_id = md2.id
INNER JOIN keywords ON meta_data_keywords.keyword_id = keywords.id AND keywords.term ILIKE '%greis%'
WHERE (media_entries.get_metadata_and_previews = TRUE
@nimaai
nimaai / macros-guideline.md
Last active October 12, 2015 21:05
Lisp macros guideline

Lisp macros guidelines

Summary of and excerpts from [chapter 8 of "On Lisp"] (http://www.bookshelf.jp/texi/onlisp/onlisp_9.html#SEC61). All examples are in Common Lisp.

###No other option except macro

Macros can do two things that functions can't:

  1. they can control (or prevent) the evaluation of their arguments.
  2. they are expanded right into the calling context (inline expansion).

Keybase proof

I hereby claim:

  • I am nimaai on github.
  • I am nimaai (https://keybase.io/nimaai) on keybase.
  • I have a public key whose fingerprint is 568A 8F52 D3A9 6F67 2660 58B8 ED1B D0FA 67C5 27A3

To claim this, I am signing this object:

@nimaai
nimaai / AR-issue-11824.rb
Created January 6, 2015 11:03
reproduction script for active record issue #11824
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end