I will post a bunch of LaTeX templates and R code here.
Homework Template
A simple template for completing homework assignments in LaTeX.
Lab Report Template
Just a nice clean template with narrow margins for writing up lab reports. Several people have asked me to share it so I am posting it here.
UnZip all files in a directory
find ./ -name \*.zip -exec unzip {} \;
Setup GitHub
This little tutorial assumes you already have a GitHub account set up. Start by installing Git on the computer you are using by Googling "install git on [my OS]". If you have a Mac or Windo ws machine, there are perfectly good GUIs available and you should just use one of those. Once Git is installed on your Linux machine, open up a terminal and cd to your home directory. Then type in:
git config --global user.name "your-name"
git config --global user.email "your-email"
Now set up git to use SSH by generating a public key:
ssh-keygen -t rsa -b 2048 -N ""
cat ~/.ssh/id-rsa.pub.
Go to Github to your user settings, click on the SSH tab and add your key. Now clone the repo you want to use by chaging directoy to the place where you want to clone the directory to and then:
git clone git@github.com:YOUR_USERNAME/YOUR_PROJECT.git
You will also need to change the way you push to use ssh instead of https. To do this you will need to alter the .git/config
file in the directory where your project is located by changing the url line in a manner analogous to the example below and then saving the file:
cd /pathToYourLocalProjectFolder
gedit .git/config
#now change the line that looks like this:
url=https://github.com/matthewjdenny/example.git
#to make it look like this:
url=ssh://git@github.com/matthewjdenny/example.git
Once you have done that, here are the commands you need to pull, commit and push:
# pull
cd /pathToYourLocalProjectFolder
git pull origin master
#commit
git add .
git commit -m "type your commit message here"
#push -- note you should pull first to prevent any errors
git pull origin master
git push origin master