Skip to content

Instantly share code, notes, and snippets.

View danielkrizian's full-sized avatar

Daniel Krizian danielkrizian

View GitHub Profile
@danielkrizian
danielkrizian / systemd-cheatsheet.org
Last active December 20, 2021 12:15
systemd cheatsheet (+ systemctl + journalctl)

hourly runs

https://linuxhint.com/cron_systemd_timer/

cat /home/dk/.config/systemd/user/gdrive.org.service
[Unit]
Description=Upload org files to my google drive
# after networking is up on the server
After=network.target
@danielkrizian
danielkrizian / conda-build-qcon.log
Created November 28, 2020 09:05
qcon: conda build log
# (base) dk@ ~ /proj/qlib/qcon$ conda build .
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for qcon
INFO:conda_build.metadata:Attempting to finalize metadata for qcon
BUILD START: ['qcon-2020.02.05-0.tar.bz2']
Cloning into '/home/dk/conda/conda-bld/qcon_1606553400852/work'...
@danielkrizian
danielkrizian / linear-algebra-cheatsheet.org
Last active April 30, 2021 11:22
linear algebra (matrix algebra)

matrix multiplication

https://youtu.be/XkY2DOUCWMU?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab q stores matrices in column-major order - it means that first element of each list is first column, second element is second column etc

special case: float vector is Nx1 or 1xN (if enlisted) matrix

q)enlist[1 2 3f] $ 1 2 3f                            / rows times columns
,14f
q)(1 3f;-2 0f)$-1 2f                                 / 5 2; (x-axis coords;y-axis coords); has columns 1 -2 and 3 0
q)(1 1f;0 1f)$(0 -1f;1 0f)                           / (1 -1f;1 0f);
@danielkrizian
danielkrizian / el-cheatsheet.org
Last active February 5, 2021 22:56
elisp cheatsheet

Definitions

  • buffer vs window vs frame
  • modeline
  • echo area
  • minibuffer
  • font locking correct term for syntax highlighting. made up of faces of properties (color, font, text size …) that pretty-print the text
  • point another word for caret or cursor: visual marker where characters typed will appear
  • mark
  • region contiguous block of text bounded by point and mark. in other editors called “selection” or “highlight”
  • current buffer buffer that has the point
@danielkrizian
danielkrizian / sh-cheatsheet.org
Last active October 24, 2023 18:43
shell bash cheatsheet
@danielkrizian
danielkrizian / gdb-cheatsheet.org
Last active March 2, 2019 21:24
gdb cheatsheet

Breakpoints

keydescription
b funName
d 1deletes breakpoint
disable 1 enable 1disable/enable breakpoint
d.deletes all breakpoints
-----------------------------------------------
r runstart program (with args)
@danielkrizian
danielkrizian / eg.org
Last active July 30, 2020 15:44
mystery behind ./[matrix; ;+;1] @ i1,i2,i3 ...
@danielkrizian
danielkrizian / spacemacs-cheatsheet.org
Last active September 24, 2024 17:39
spacemacs cheatsheet

useful spacemacs commands

  • SPC q q quit
  • C-g abort action
  • SPC w / split window vertically
  • SPC w - split window horizontally
  • SPC w c delete current window
  • SPC f f find a file
  • SPC f s save a file (:w also works)
  • SPC p h find a file in current project
  • SPC b d kill current buffer