init
This commit is contained in:
Executable
+82
@@ -0,0 +1,82 @@
|
||||
# ==============================================================================
|
||||
# Auth: dodd
|
||||
# File: .zshrc
|
||||
# Revn: 09-06-2023 0.1
|
||||
# Func: Define user-made aliases and functions to make using the terminal easier
|
||||
#
|
||||
# TODO: come up with new things to change
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-06-2023: init
|
||||
# copied over useful aliases from ocelot
|
||||
# wrote function to ssh into ocelot remotely, ip robust
|
||||
# 09-09-2023: added aliases to gcc and g++
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
|
||||
# User specific aliases and functions
|
||||
## Aliases
|
||||
|
||||
### Shows everything in detail, except . and ..
|
||||
alias ll="ls -AFGhl"
|
||||
alias l="ls -AFGhl"
|
||||
|
||||
### Go home
|
||||
alias home="cd ~"
|
||||
|
||||
### mac gcc is an alias for clang
|
||||
### after downloading gcc, it's not in the global bin, it's local
|
||||
alias gcc="/usr/local/bin/gcc-13"
|
||||
alias g++="/usr/local/bin/g++-13"
|
||||
|
||||
### donut
|
||||
alias donut="~/donut"
|
||||
|
||||
### load changes to .zshrc
|
||||
alias src="source ~/.zshrc"
|
||||
|
||||
### ssh into ocelot
|
||||
alias ocelot="ssh ocelot@192.168.1.120"
|
||||
|
||||
### ssh into sentinel
|
||||
alias sentinel="ssh pi@192.168.1.169"
|
||||
|
||||
## Aliases
|
||||
|
||||
## Functions
|
||||
### ssh into ocelot remotely
|
||||
rocelot() {
|
||||
# grab ip from ip repo
|
||||
ip=$( cat ~/Documents/work/tax-returns-1997/data )
|
||||
# ssh into ip from repo
|
||||
ssh ocelot@$ip
|
||||
}
|
||||
|
||||
### ssh into ocelot remotely
|
||||
rsentinel() {
|
||||
# grab ip from ip repo
|
||||
ip=$( cat ~/Documents/work/tax-returns-1997/data )
|
||||
# ssh into ip from repo
|
||||
# specify port 23, according to router settings, ssh port was
|
||||
# moved from 22 to 23, to avoid collision with ocelot
|
||||
ssh -p 23 pi@$ip
|
||||
}
|
||||
|
||||
## Functions
|
||||
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd() { vcs_info }
|
||||
|
||||
zstyle ':vcs_info:git:*' formats '%b '
|
||||
|
||||
# zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html
|
||||
setopt PROMPT_SUBST
|
||||
# %F{color}...%f colors the encompassed text /color/
|
||||
# %m - shows the short machine name
|
||||
# %1d - current working directory
|
||||
PROMPT='%F{green}%m%f:%F{blue}%1~%f ⇌ '
|
||||
#PROMPT='%F{green}%*%f %F{blue}%~%f %F{red}${vcs_info_msg0}%f$ '
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
k;double sin()
|
||||
,cos();main(){float A=
|
||||
0,B=0,i,j,z[1760];char b[
|
||||
1760];printf("\x1b[2J");for(;;
|
||||
){memset(b,32,1760);memset(z,0,7040)
|
||||
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28
|
||||
>i;i+=0.02){float c=sin(i),d=cos(j),e=
|
||||
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c*
|
||||
h*e+f*g+5),l=cos (i),m=cos(B),n=s\
|
||||
in(B),t=c*h*g-f* e;int x=40+30*D*
|
||||
(l*h*m-t*n),y= 12+15*D*(l*h*n
|
||||
+t*m),o=x+80*y, N=8*((f*e-c*d*g
|
||||
)*m-c*d*e-f*g-l *d*n);if(22>y&&
|
||||
y>0&&x>0&&80>x&&D>z[o]){z[o]=D;;;b[o]=
|
||||
".,-~:;=!*#$@"[N>0?N:0];}}/*#****!!-*/
|
||||
printf("\x1b[H");for(k=0;1761>k;k++)
|
||||
putchar(k%80?b[k]:10);A+=0.04;B+=
|
||||
0.02;}}/*****####*******!!=;:~
|
||||
~::==!!!**********!!!==::-
|
||||
.,~~;;;========;;;:~-.
|
||||
..,--------,*/
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
# ==============================================================================
|
||||
# Auth: Alex Celani
|
||||
# File: mac_dl.sh
|
||||
# Revn: 09-09-2023 0.1
|
||||
# Func: print the apps and links of stuff to download
|
||||
#
|
||||
# TODO: create
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-09-2023: init
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
echo "chrome"
|
||||
echo "https://www.google.com/chrome/"
|
||||
|
||||
echo "spotify"
|
||||
echo "https://www.spotify.com/us/download/mac/"
|
||||
|
||||
echo "minecraft"
|
||||
echo "https://www.minecraft.net/en-us/download"
|
||||
|
||||
echo "notion"
|
||||
echo "https://www.notion.so/desktop"
|
||||
|
||||
echo "arduino"
|
||||
echo "https://www.arduino.cc/en/software"
|
||||
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
# ==============================================================================
|
||||
# Auth: Alex Celani
|
||||
# File: mac_setup.sh
|
||||
# Revn: 09-09-2023 0.1
|
||||
# Func: re-setup terminal tools in mac
|
||||
#
|
||||
# TODO: create
|
||||
# ==============================================================================
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------------------------
|
||||
# 09-09-2023: init
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
brew help > out 2> errout
|
||||
rm out
|
||||
|
||||
if [ -n errout ]; then
|
||||
rm errout
|
||||
echo "installing brew"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
|
||||
brew install gcc
|
||||
brew install go
|
||||
brew install htop
|
||||
brew install neofetch
|
||||
brew install onefetch
|
||||
brew install rust
|
||||
brew install tmux
|
||||
brew install wireshark
|
||||
|
||||
/usr/local/bin/gcc-13 -o donut donut.c > /dev/null 2> errout
|
||||
|
||||
if [ -n errout ]; then
|
||||
rm errout
|
||||
echo "gcc failed"
|
||||
else
|
||||
mv donut ~/
|
||||
fi
|
||||
|
||||
|
||||
echo "generate a github PAT"
|
||||
|
||||
cd ~/Documents/
|
||||
mkdir work
|
||||
cd work
|
||||
|
||||
git clone https://github.com/alexander-the-alright/dotfiles
|
||||
cp dotfiles/mac/.zshrc ~/
|
||||
cp dotfiles/mac/.vimrc ~/
|
||||
cp -r dotfiles/mac/.vim ~/
|
||||
|
||||
git clone https://github.com/alexander-the-alright/TDM
|
||||
go build TDM/tdm.go
|
||||
mv tdm ~/
|
||||
|
||||
git clone https://github.com/alexander-the-alright/soary
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
% Style file for CS5311 "Theory of Computation" documents
|
||||
% Charles Wallace
|
||||
% These style settings are what I use to format the lecture notes and homework assignments.
|
||||
% Feel free to use as much (or as little) of them as you like.
|
||||
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsthm}
|
||||
\usepackage{latexsym}
|
||||
\usepackage{fullpage,parskip,paralist}
|
||||
\usepackage{amsmath,amsthm,amssymb}
|
||||
\usepackage{graphicx}
|
||||
|
||||
\ifdefined\nosol
|
||||
\newcommand{\sol}[1]{}
|
||||
\newcommand{\soltitle}{}
|
||||
\else
|
||||
\newcommand{\sol}[1]{{\bf Solution.} #1}
|
||||
\newcommand{\soltitle}{: Solutions}
|
||||
\fi
|
||||
|
||||
\newcommand{\thetitle}[1]{\title{#1\soltitle}}
|
||||
\author{}
|
||||
\date{CS5311, Theory of Computation}
|
||||
|
||||
% \ie, \eg: the abbreviations the way they are supposed to be written
|
||||
\newcommand{\ie}{{\em i.e.,}}
|
||||
\newcommand{\eg}{{\em e.g.,}}
|
||||
|
||||
% These set common formats for various kinds of names
|
||||
% \prob{P}: name of problem/language P
|
||||
\newcommand{\prob}[1]{\mbox{\bf #1}}
|
||||
% \pprob{P}{M}: problem P restricted to machine class M
|
||||
\newcommand{\pprob}[2]{\mbox{$\prob{#1}_{\prob{\tiny #2}}$}}
|
||||
% \prog{M}: name of program/machine M
|
||||
\newcommand{\prog}[1]{\mbox{\tt #1}}
|
||||
% \enc{M}: string encoding of machine M
|
||||
\newcommand{\enc}[1]{\mbox{[\prog{#1}]}}
|
||||
% \lang{M}: language accepted by machine M
|
||||
\newcommand{\lang}[1]{\mbox{\bf L(\prog{#1})}}
|
||||
|
||||
% definition environment (unnumbered)
|
||||
\theoremstyle{definition}
|
||||
\newtheorem*{definition}{Definition}
|
||||
% numbered environments: theorem, proof, lemma, corollary, claim
|
||||
\newtheorem{theorem}{Theorem}
|
||||
\newtheorem{lemma}{Lemma}
|
||||
\newtheorem{corollary}{Corollary}
|
||||
\newtheorem{claim}{Claim}
|
||||
|
||||
% Proof opening statement
|
||||
\newcommand{\prf}{{\em Proof.}}
|
||||
\newcommand{\prfout}{{\em Proof outline.}}
|
||||
|
||||
% \code{L}{P}{I}{C}: Turing Machine code (as a box containing formatted text)
|
||||
% L: horizontal length of box
|
||||
% P: name of program
|
||||
% I: names of inputs
|
||||
% C: program code
|
||||
\newcommand{\code}[4]{\fbox{\parbox{#1}
|
||||
{\prog{#2}\hfill (Input: #3)
|
||||
\begin{enumerate}
|
||||
#4
|
||||
\end{enumerate}}}}
|
||||
|
||||
% some common problems
|
||||
\newcommand{\atm}{\pprob{A}{TM}}
|
||||
\newcommand{\etm}{\pprob{E}{TM}}
|
||||
\newcommand{\alltm}{\pprob{All}{TM}}
|
||||
\newcommand{\acfl}{\pprob{A}{CFL}}
|
||||
\newcommand{\allcfl}{\pprob{All}{CFL}}
|
||||
\newcommand{\areg}{\pprob{A}{RL}}
|
||||
\newcommand{\allreg}{\pprob{All}{RL}}
|
||||
\newcommand{\anfa}{\pprob{A}{NFA}}
|
||||
\newcommand{\adfa}{\pprob{A}{DFA}}
|
||||
|
||||
% \bigo{T}: big-O of term T
|
||||
\newcommand{\bigo}[1]{\mbox{O$(#1)$}}
|
||||
% \expbigo{T}: 2^(big-O of term T)
|
||||
\newcommand{\expbigo}[1]{\mbox{$2^{\mbox{O$(#1)$}}$}}
|
||||
% \bigom{T}: big-Omega of term T
|
||||
\newcommand{\bigom}[1]{\mbox{$\Omega(#1)$}}
|
||||
% time/space complexity terms
|
||||
\newcommand{\TIME}[1]{\mbox{TIME$(#1)$}}
|
||||
\newcommand{\NTIME}[1]{\mbox{NTIME$(#1)$}}
|
||||
\newcommand{\SPACE}[1]{\mbox{SPACE$(#1)$}}
|
||||
\newcommand{\NSPACE}[1]{\mbox{NSPACE$(#1)$}}
|
||||
% some common complexity classes
|
||||
\newcommand{\PTIME}{\mbox{P}}
|
||||
\newcommand{\NPTIME}{\mbox{NP}}
|
||||
\newcommand{\EXPTIME}{\mbox{EXPTIME}}
|
||||
\newcommand{\PSPACE}{\mbox{PSPACE}}
|
||||
\newcommand{\NPSPACE}{\mbox{NPSPACE}}
|
||||
\newcommand{\LSPACE}{\mbox{L}}
|
||||
\newcommand{\NLSPACE}{\mbox{NL}}
|
||||
\newcommand{\coNLSPACE}{\mbox{coNL}}
|
||||
\newcommand{\NC}{\mbox{NC}}
|
||||
\newcommand{\NPcomplete}{\NPTIME-complete}
|
||||
|
||||
% \polyreduce{P}{Q} polynomial-time reduction relation
|
||||
\newcommand{\polyreduce}[2]{$\prob{#1}\leq_{\mbox{\small P}}\prob{#2}$}
|
||||
% \logreduce{P}{Q}: log-space reduction relation
|
||||
\newcommand{\logreduce}[2]{$\prob{#1}\leq_{\mbox{\small L}}\prob{#2}$}
|
||||
|
||||
\newcommand{\gad}{\mathbf{Gadget}}
|
||||
\newcommand{\domino}[2]
|
||||
{\begin{tabular}{|l|} \hline $#1$\\ \hline $#2$ \\ \hline \end{tabular}}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 MiB |
Reference in New Issue
Block a user