Skip to content

Commit

Permalink
New function to git clone from clipboard URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dnnsmnstrr committed Nov 8, 2019
1 parent df6865f commit 8c42e82
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ alias yp='yarn pods'
alias ys='yarn start'
alias yr='y; yp; ys'
alias ycc='yarn cache clean'
alias yg='yarn global add'


## Networking

Expand Down Expand Up @@ -115,8 +117,9 @@ alias spoton="sudo mdutil -a -i on"

# Show system information
alias displays="system_profiler SPDisplaysDataType"
alias cpu="sysctl -n machdep.cpu.brand_string"

alias cpuinfo="sysctl -n machdep.cpu.brand_string"
alias cpu='top -o cpu' # CPU
alias mem='top -o rsize' # Memory
## Finder
alias finder="open ."

Expand Down Expand Up @@ -156,10 +159,11 @@ alias ....="cd ../../.."
alias .....="cd ../../../.."
alias -- -="cd -"


# Make executable
alias ax="chmod a+x"

alias os='osascript'

## ls
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
Expand Down Expand Up @@ -265,6 +269,7 @@ alias functionlist="declare -f | grep '^[a-z].* ()' | sed 's/{$//'"

## Apps
alias sketch="open -a Sketch"
alias safari="open -a Safari"

## lol

Expand Down
5 changes: 5 additions & 0 deletions .functions
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ function gcd() {
git clone "$1" && cd "$(basename "$1" .git)" || return
}

# Git clone from clipboard
gcb(){
git clone "$(pbpaste)"
}

# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
function targz() {
local tmpFile="${*%/}.tar";
Expand Down
7 changes: 7 additions & 0 deletions .setup/init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/env bash

# nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

# oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# fish
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish

# mac-cli
sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"
8 changes: 6 additions & 2 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ git clone https://github.com/dnnsmnstrr/dotfiles.git && cd dotfiles && source bo

- [Add SSH keys to GitHub](https://github.com/settings/ssh) and [other](https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html) version control systems (also [GPG](https://gpgtools.org/))

* init [`spicetify`](https://github.com/khanhas/spicetify-cli/wiki/Basic-Usage)

# init

The init script will:

- Install NVM

```bash
Expand All @@ -53,8 +59,6 @@ git clone https://github.com/dnnsmnstrr/dotfiles.git && cd dotfiles && source bo
sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"
```

- init [`spicetify`](https://github.com/khanhas/spicetify-cli/wiki/Basic-Usage)

# Adding Apps, Aliases or Functions

To maintain the list of your installed apps, add them to their corresponding place in [`brew.sh`](https://github.com/dnnsmnstrr/dotfiles/blob/master/.brew/brew.sh). Aliases and functions can be added to their respective files.
Expand Down

0 comments on commit 8c42e82

Please sign in to comment.