This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMPNAME=$(mktemp -t lyxit) | |
tee ${TMPNAME}.tex 2>/dev/null 1>/dev/null | |
tex2lyx ${TMPNAME}.tex 2>/dev/null 1>/dev/null | |
lyx ${TMPNAME}.lyx 2>/dev/null 1>/dev/null | |
lyx -e latex ${TMPNAME}.lyx 2>/dev/null 1>/dev/null | |
sed -e '1,/\begin{document}/d' -e '/\end{document}/,$d' ${TMPNAME}.tex \ | |
| sed -e '/./,$!d' -e ':a' -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine load_txt_data_1d_d(d, f) | |
implicit none | |
real*8, intent(out) :: d(:) ! array of text data | |
character(*), intent(in) :: f ! chanel file name | |
open(51, file=trim(f), status='old', action='read') | |
read(51, *) d | |
close(51) | |
endsubroutine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine load_bin_data_1d_r(d, f) | |
implicit none | |
real*4, intent(out) :: d(:) ! array of binary data | |
character(*), intent(in) :: f ! chanel file name | |
integer*4 :: n | |
n = size(d) | |
open(51, file=trim(f), status='old', form='unformatted', & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fftfreq(st, block) | |
implicit none | |
real*8, intent(in) :: st(:) ! sample time | |
integer, intent(in) :: block | |
real*8 :: fftfreq(size(st)) | |
integer*4 :: n, i | |
real*8 :: t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Hanning Windows | |
window = (0:block-1)'; %' Mwhaa Sublime :)) | |
window = 0.5*(1-cos(2*pi*window/(block-1))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Plot chanel 9 of config [5 6] | |
loglog(freqt(1:block/2), permute(x(1:block/2,9,[5 6]), [1,3,2])); | |
% Plot chanel [8 9 10] of config 6 | |
loglog(freqt(1:block/2), x(1:block/2,[8 9 10],6)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" LaTeXForwadSearch {{{ | |
function! LaTeXForwadSearch() | |
silent! execute '!"C:\Applications\SumatraPDF\SumatraPDF.exe -reuse-instance ' \ | |
. expand('%:p:r') . '.pdf -forward-search ' . expand('%:p') . ' ' . line('.') . '"' | |
" This line is reverse search for SumatraPDF | |
"C:\Users\Link\Dropbox\Applications\Vim\gvim.exe" --remote-silent +"%l|norm zz" "%f" | |
endfunction | |
" }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set efm=%-Ggfortran%.%#,%A%f:%l:,%A%f:%l.%c:,%A%f:%l:,%C,%C%p%*[0123456789^],%Z%trror:\ %m,,%Z%tarning:\ %m,%C%.%#,%-Gmake%.%# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(provide 'regions) | |
(defvar regions nil | |
"Regions in buffer.") | |
(defun regions-maybe-push-selection () | |
"Push mark and point if point is not in regions." | |
(let ((point (point)) | |
exists) | |
(dolist (sel regions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: mitmdump -s "modify_response_body.py mitmproxy bananas" | |
# (this script works best with --anticache) | |
from libmproxy.models import decoded | |
script = ''' | |
<script type="text/javascript"> | |
(function() { | |
var width = 400; | |
big(); |