Skip to content

Instantly share code, notes, and snippets.

View alexkuhl's full-sized avatar

Alex Kuhl alexkuhl

View GitHub Profile
alexkuhl / mac_terminal_setup.txt
Last active February 10, 2023 15:09
Mac Terminal Setup
View mac_terminal_setup.txt
iterm2 with profile > color > preset to Tango Dark
powerlevel10k -
install k for better ls -
In iTerm profile > keys set left/right option key to Esc+ --> this allows for alt+backspace and command+backspace to delete block and line, respectively
go to key mappings, add new, press alt+left arrow for the shortcut, set action to send escape sequence, then b for Esc+
do the same for alt+right arrow with f, these set backward and forward cursor jumps
alexkuhl / pythagorean_tree.html
Last active December 11, 2015 19:30
Pythagorean Tree - draw a PTree using HTML5 canvas
View pythagorean_tree.html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<canvas id="ptcanvas" width="400" height="400" style="border:1px dotted;float:left"></canvas>
function draw_square( ctx, x1, y1, x2, y2, x3, y3, x4, y4 )
ctx.beginPath( ) ;
alexkuhl / cs_cheat_sheet.txt
Created October 17, 2015 16:24
Computer Science "Cheat Sheet"
View cs_cheat_sheet.txt
This "cheat sheet" is designed to be a super-high level view of common and/or important computer science concepts. Good for test reviews, preparing for job interviews, brushing up on the basics, becoming a better person, or light reading for putting your significant other to sleep. I will continue to update this so if you have any suggestions or corrections please send a pull request or contact me. Licensed under
+ Limiting behavior (all the second sections are as limit(n)->infinity)
* Big O - f is bounded by g :: f(n) <= g(n)*c (for some constant c) :: an upper bound, can be much higher than actual performance because this is not a tight bound, for example a log(n) algorithm technically is O(n!) but is obviously way better than something that actually gets n! performance
* Small or Little o - f dominated by g :: f(n) < g(n)*c; f(n)/g(n) = 0 :: g gets much larger
* Big Omega - f is bounded below by g :: |f(n)| >= g(n)*c :: a lower bound, bu
alexkuhl / .vimrc
Last active May 4, 2018 14:48
Linux dot files
View .vimrc
set expandtab " use spaces when <TAB> is inserted
set shiftwidth=2 " number of spaces to use for (auto)indent step
set tabstop=2 " number of spaces that <Tab> in file uses
set autoindent " indent as last
set hlsearch " Highlight all found items
set incsearch " Show first match while still typing
alexkuhl / .bashrc
Last active September 25, 2015 01:38
Linux dot files
View .bashrc
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS -CF'
alias ll='ls $LS_OPTIONS -Flha'
alias lldf='ls $LS_OPTIONS -Flha --group-directories-first'
alexkuhl / color_conversion_library.hpp
Created November 27, 2010 17:08
An easy-to-use and understand C++ library for colorspace conversions. Currently works with RGB <-> HSL/HSV. Will probably add more in the future.
View color_conversion_library.hpp
Copyright (c) 2010, Alex Kuhl,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.