Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yevagorbachev committed Apr 28, 2022
1 parent 29ed7e5 commit f23348a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
5 changes: 3 additions & 2 deletions auxiliary-files/maketex/std-cmd.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
\documentclass{article}
\usepackage{siunitx, amsmath, amssymb, adjustbox, graphicx, float, hyperref}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper, portrait, margin=1in]{geometry}
\usepackage{adjustbox}
\usepackage[shortlabels]{enumitem}
\usepackage{siunitx, amsmath, amssymb} % symbols and operators

\setlength{\parindent}{0pt}
\setlength{\parskip}{0.5em}
\setlength{\tabcolsep}{0.5em}
\renewcommand{\arraystretch}{1.5}

% Symbols
\newcommand{\N}{\mathbb{N}}
Expand Down
6 changes: 3 additions & 3 deletions configs/.vim/UltiSnips/tex.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endglobal

# [[[ ENVIRONMENTS

snippet '\\begin{(\w+)}' "begin/end" r
snippet '\\begin{(\w+\*?)}' "begin/end" r
\begin{`!p snip.rv = match.group(1)`}
$0
\end{`!p snip.rv = match.group(1)`}
Expand Down Expand Up @@ -49,7 +49,7 @@ endsnippet

snippet ULAR "tabular"
\begin{tabular}{${1:colspec}}
\hline $2 \\
\hline $2 \\\\
\hline
\end{tabular}$0
endsnippet
Expand Down Expand Up @@ -118,7 +118,7 @@ while i:
depth += 1
elif argument[i] in "{[(":
depth -= 1
if depth < 0 or (depth == 0 and argument[i] in ' ='):
if depth < 0 or (depth == 0 and argument[i] in ' =\t'):
break
i -= 1
Expand Down
42 changes: 34 additions & 8 deletions configs/.zsh_aliases
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
WINDOWS="/mnt/c"
WINUSER="$WINDOWS/Users/yevge" # change user as appropriate
REPOS="$WINUSER/Data/repos"
DOCS="\"$WINUSER/OneDrive - rit.edu/Documents\"" # needs to be run using eval cd
DOCS="\"$WINUSER/OneDrive - rit.edu/Documents\""
# cd $DOCS needs to be eval for some reason

alias python="python3"
alias pip="pip3"
alias config="vim ~/.zshrc"
alias aliases="vim ~/.zsh_aliases"
alias update=". ~/.zshrc"

alias mkae="sl"
alias maek="sl"
alias mkae="sl" # funny
alias maek="sl" # also funny
alias dor="sl" # also also funny

function cyntax {
function cyntax { # syntax-check c file
gcc -fsyntax-only $1
}

function plotcrop {
function clean-sub { # make clean for immediate subdirectories
for dir in */; do
make -C $dir clean
done
}

function plotcrop { # crop in-place with no margin
pdfcrop -margin 0 $1 $1
}

# creates a tex project named $1
function maketex {
function plotcrop-all { # plotcrop all .pdf in cwd
for file in *.pdf; do
plotcrop $file
done
}

function maketex { # create tex project named $1
cp ~/wsl-setup/auxiliary-files/maketex/* .
mv texfile.tex $1'.tex'
sed 's/{texfile}/'$1'\.tex/g' makefile -i
Expand All @@ -32,7 +45,20 @@ function theme {
sed 's/ZSH_THEME=\"[a-z]*\"/ZSH_THEME=\"'$1'\"/g' ~/.zshrc -i
}

# testing toggl API
touch ~/.projects

# set current projects
# using ! as sed delimiter to not conflict with "/" in paths
function project-set {
sed -i "${1}s!.*!$(pwd)!" ~/.projects
}

# cd to project
function project {
eval cd \"$(sed -n "$1{p;q}" ~/.projects)\"
}

# testing toggl API (deprecated)
# GET request
function toggl-get {
curl -S -u $(cat ~/.toggl_token)':api_token' 'https:/api.track.toggl.com/api/v8/'$1 | python -m json.tool
Expand Down

0 comments on commit f23348a

Please sign in to comment.