In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
import math | |
class DecodingError(Exception): | |
"""Raised if no path ends in the zero state""" | |
pass | |
class TrellisPath: | |
def __init__(self, last_state=0): |
Go to github | |
Create new repository [don't need to initialize with the readme (can add later)] | |
Go to R Studio | |
File -> New Project -> Version Control -> Git | |
Ctrl+V repository URL from GitHub | |
File -> New -> Markdown, enter Title, etc. | |
In the Markdown window, change "output=html_document" to "output=github_document" | |
Knit the document for the first time, will prompt you to save | |
Save as Title.rmd | |
In the "git" tab of the R studio Environment window, you will notice that the knit produced: |
brew list --formula | xargs -n1 -P8 -I {} \ | |
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \ | |
sort -h -r -k2 - | column -t |
# toggle iTerm Dock icon | |
# add this to your .bash_profile or .zshrc | |
function toggleiTerm() { | |
pb='/usr/libexec/PlistBuddy' | |
iTerm='/Applications/iTerm.app/Contents/Info.plist' | |
echo "Do you wish to hide iTerm in Dock?" | |
select ync in "Hide" "Show" "Cancel"; do | |
case $ync in | |
'Hide' ) |