Instantly share code, notes, and snippets.

View init-treemacs.el
;; list the packages you want
(setq package-list
'(treemacs))
;; list the repositories containing them
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")))
;; activate all the packages (in particular autoloads)
View tide-indent-when-hit-enter.ts
// so pointer located here (_)
if (true) {_}
// when I hit enter I got
if (true) {
_}
// when I hit enter I want this
if (true) {
_
View profile-report
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ([completion-basic-try-completion "#<compiled 0xcf5bef>" completion--some completion--nth-completion completion-try-completion execute-extended-command--shorter execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 9 [completion-pcm--all-completions completion-pcm--find-all-completions completion-pcm-try-completion "#<compiled 0xcf5bef>" completion--some completion--nth-completion completion-try-completion execute-extended-command--shorter execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil] 5 [completion-pcm--string->pattern completion-pcm--find-all-completions completion-pcm-try-completion "#<compiled 0x1a3c4bf>" completion--some completion--nth-completion completion-try-completion execute-extended-command--shorter execute-extended-command funcall-interactively call-interactively command-execute nil nil nil
View init-config-snippets.vim
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-fugitive', { 'on': [] }
Plug 'airblade/vim-gitgutter'
call plug#end()
" to deal with vim-fugitive
command! Gstatus call LazyLoadFugitive('Gstatus')
command! Gdiff call LazyLoadFugitive('Gdiff')
command! Glog call LazyLoadFugitive('Glog')
command! Gblame call LazyLoadFugitive('Gblame')
View get_angle_between_clock_arrows.py
def get_angle_between_clock_arrows(h, m):
return abs(360/60*m - 360/12*(h - h/12*12))