Skip to content

Instantly share code, notes, and snippets.

View scajanus's full-sized avatar

Sakari Cajanus scajanus

View GitHub Profile
#!/bin/bash
{ list=( [0-9]*.csv ); head -n 1 "${list[1]}" & tail -q -n +2 "${list[@]}"; } > merged.csv
num=$(echo $(head -n 1 merged.csv | wc -c) - $(head -n 1 merged.csv | tr -d ';' | wc -c) | bc)
echo ${num}
mkdir plots
for i in $(seq 2 $num)
do
<br>more <a href=\'http://www.siteforlyrics.com\' title=\'free lyrics\'>free lyrics</a>
<br>more <a href=\'http://www.another.com\' title=\'free lyrics\'>free lyrics</a>
<br>more <a href=\'http://www.another.com\' title=\'free lyrics\'>free lyrics</a>
Command:
%s;\V<br>more <a href=\\'http://www.siteforlyrics.com\\' title=\\'free lyrics\\'>free lyrics</a>;;
(yy to yank the line above, press q:, p and <CR>
@scajanus
scajanus / gist:c51de2e37d2fd0221589
Created August 28, 2014 10:38
Vimgor listfacts
13:35 <sakkemo> listfacts
13:35 <vimgor> osx, forget, vimperator, vcm, vimtiny, ggVGd, vim's like a big school, norc, really?, dvsm, easymotion, esc, vlm, whitelines, VAM, faq, netlib, :v, dvorak, buftabs.vim, insert mode, magic, help!, helpme, colorcoke, screen =~ s/a/Screen, leader, try, dists, :W, what's up, doesn't work, :Sex, format code, vimdictive, comment text object, textobjectify, html with php, asif, vim or emacs, macro (16 more messages)
13:35 <sakkemo> more
13:35 <vimgor> articles, clipboard, vimball, nickanswer, tips, elebird, vimregrap, movement, last-position, recommended plugins, hates away updates, fugitive, ranger, ubuntu, test3 test4?, Not sure if I know how to use that?, good night, neovim =~ s/^/neovim, yank all, janus, vimple, pick, e9, options, bof, recursion, install pathogen, filetype, paste me a column, _Cody, tmux, vim, Houl, capslock, I always lie; I, (15 more messages)
13:36 <sakkemo> more
13:36 <vimgor> e30, duck, tools, vimpire, regex, vba2zip, e6, tim-tiny, html and php, angry
> diff(mydata$time[mydata$outlier=="TRUE"])
Time differences in secs
[1] 3600 3630 3570 30 3570 3630 3600 3570 3630 3600
[11] 2700 900 30 10710 180 360 3120 3600 3600 3600
[21] 3600 3600 3600 3600 3600 3600 3600 3600 3600 3600
[31] 3600 180 30 300 180 10110 3600 5880 30 510
[41] 30 30 300 30 390 3600 3600 3600 3600 3600
[51] 3600 3600 840 2370 30 360 960 30 150 30
[61] 1800 30 600 720 30 30 30 90 30 540
[71] 30 30 30 2040 510 3960 360 150 210 30
@scajanus
scajanus / dataa.txt
Created June 17, 2014 07:22
dataa.txt
1401772523993
1401772524993
1401772525996
1401772526993
1401772527993
1401772528998
1401772529992
1401772530920
1401772531993
Normal xxx ctermfg=188 ctermbg=233 guifg=#e8e8d3 guibg=#151515
ctermfg = Foreground color in terminal emulators
ctermbg = Background color in terminal emulators
guifg = Foreground color in e.g. GUI provided by GTK or QT
guibg = Background color in e.g. GUI provided by GTK or QT
Just setting ctermfg and ctermbg should be enough if you are only using
vim in a terminal emulator.
17.1.2014
klokov press 4,4,4,4,6,4x40
DB row 12,10,8x40
==>
INSERT INTO TRAINING (DATE, SESSION, SET_INDEX, EXERCISE, WEIGHT, REPETITIONS, RPE, SUPERSET, NOTES, TAGS) VALUES (2014-01-17 00:00:00, 1, 1, 'klokov press', 40, 4, 7, 0, 'no notes', 'no tags')
INSERT INTO TRAINING (DATE, SESSION, SET_INDEX, EXERCISE, WEIGHT, REPETITIONS, RPE, SUPERSET, NOTES, TAGS) VALUES (2014-01-17 00:00:00, 1, 1, 'klokov press', 40, 4, 7, 0, 'no notes', 'no tags')
@scajanus
scajanus / otherWindowMode.vim
Last active January 3, 2016 11:58
Example of how to implement a faux 'new mode' for vim, in this case for sending some scrolling/search commands to 'last accessed window', as determined by CTRL-W p.
" instructions: use <leader>w to enter 'movement commands in other window',
" mode. The other window is the one you switch to with <C-w>p.
"
" Now * works like * in current window, except for the fact the the
" searching is performed in other window.
"
" The scrolling commands scroll the other window, instead of current.
"
" Use <ESC> to exit this mode.
@scajanus
scajanus / gist:8399302
Created January 13, 2014 12:15
di-opinnot
MODUULIT
========
Pääaine syventävä moduuli A3 20 op
---------------------------------------------
* T-61.5050 High-throughput bioinformatics [X]
* T-61.5020 Computational genomics [X]
* T-61.5110 Modeling Biological Networks P [O]
* Special Course in Bioinformatics I L [ ]
~/.vim(branch:master*) » ls *
gvimrc README.md vimrc
autoload:
pathogen.vim
bundle:
jellybeans
spell: