Skip to content

Commit

Permalink
Update from paulirish repo (#2)
Browse files Browse the repository at this point in the history
* move fish path.

* local cron jobs

* remove diff-so-fancy as there's a new setup.
https://github.com/stevemao/diff-so-fancy

* iterm2 prefs. new beta

* ssh config. session holding for superfast git work.

* cron adjustments

* cron adjustments

* ag: default configuration for fast searchin'

* git sugar. clone (cd, and install), other aliases and config

* iterm2 prefs.

* eslint. max-len 110. other tweaks

* osx: activity monitor columns per tab.

* homebrew and disk management stuff. assorted.

*  lol alias wget="curl -O"

* fuck is an enjoyable experience.

* server alias now using npm's statik instaed of SimpleHTTPServer because it doesnt serve the .git folder.

* really enjoying using vscode so far.

* fish: been using it for a few months. enjoying it.

* imgcat for showing inline images in iterm2 v3. so tight.

* minor vim config changes.

* docs: random notes on bash/fish/images and other ephemera

* bash tricks. print all colors.

* bash tricks. print all colors.

* `git chromecheckout`: checkout the pull request you're looking at.

Uses the foreground tab's URL and and passes it to `hub` to checkout
the PR into a branch.

screenshot: http://i.imgur.com/lt41D68.png

* i'm using fish shell mostly now, some bash tho.

* git chromecheckout also works with canary.

* remove chmod for z.sh

* remove unnecessary path update

* Fix bash 4 config permission issue

* update wget install with iri

* fix firefoxnightly install issue

* fix screenflow install issue

* alias: master = git checkout master

* Update git-chromecheckout

Readability

* minor: removing old stuff.

* Fix: -W invalid command

-W is not a valid option for ag

* gem update --no-document rather then deprecated switch

* csvpreview (paulirish#73) - preview csv files in terminal

* update gnu-sed install param

* typo

Just guessing you meant the one you're using here.

* Add link to repositories of paulmillr and gf3

* cron script updates. [minor]

* eslint config tweaks

* delete-merged-branches gets more upgrades. oh yeah.

* iterm2 prefs.

* git-recent. my upgraded recent branch listing.

* alias & function tweaks

* gifify fix: filenames with spaces.

* brew bash completion. fixes paulirish#80

* gitconfig: compactionHeuristic

* git-recent moved to solo repo.

* update "--with-override-system-vi"。

Warning: vim: --override-system-vi was deprecated; using --with-override-system-vi instead!

* update "--with-override-system-vi"。

to avoid “ vim: --override-system-vi was deprecated; using --with-override-system-vi instead!” warming。

* shopt is a builtin. treat it as such

fixes paulirish#84

* minor: my cron and iterm stuff.

* fish completions.

* safetycheck before thefuck. kill googlecloud thingz.

* delete merged branches. force delete.

* Remove right arrow command

There's a nagging deprecation warning now.
```
zsh-autosuggestions: AUTOSUGGESTION_ACCEPT_RIGHT_ARROW is deprecated. The right arrow now accepts the suggestion by default.
```

* yarn instead of npm

* always ssh for github.

* node_modules to global gitignore. this isn't for everyone.

* rsync snippet

* iterm prefs.

* bump git-friendly.

* minor: iterm prefs bump.

* tweaked gitconfig insteadOf's

* fish prompt maybeToggleDirtyState for chromium

* setup new machine: system config for  large git repos.

* tweak cron scripts.

* yarn globals.

* rename ssh config.

* tweaks to my cronjobs.

* fish prompt: migrate to port of 'pure' prompt

* improvements to prompt.

* [minor] iterm prefs.

* add .hushlogin file which avoids 'Last login: Mon Dec 12 10:40:21 on ttys013' message

* readme note about submodule

* [minor] rvm path.

* bump pure fish theme.

* gotta have that nano syntax highlight.

* alias gti=git

* bump pure prompt.

* bump pure prompt.

* alias chmox='chmod -x'

* bump pure prompt.

* Replace `gh` with `hub` since they have been merged together (paulirish#86)

* Replace gh with hub. gh was merged into hub
* brew.sh comments about `hub`

* z for bash via brew.

* import * from bash-sensible. fixes paulirish#59

* disable diff-so-fancy on patch mode for now. :(

* fish: include the local .extra.fish with machine-specific stuff

* remove old fish_prompt symlink

* eslintrc to eslintrc.js

* gz function for fish

* yarn globals in PATH for fish

* hello to git delete-squashed-and-merged-branches

* bump pure prompt

* brew/cask. minor adjustments in install list.

* brew: ncdu and z

* fish: safety check on .extra.fish

* fish: fix md function to use -p

* minor: my crontab.

* PATH juggling and yarn globals.

* tweak to computer migration docs.

* migration folders.

* migration dotfiles.

* migration folders.

* migration folders.

* update .osx with latest from mathias. only selected what i want w/ -p

* add chromium methods as fish functions.

* chromium git tweak

* minor: test file exists
  • Loading branch information
sumeetadur committed Mar 14, 2017
1 parent b9eb3e8 commit 80351dd
Show file tree
Hide file tree
Showing 72 changed files with 27,636 additions and 494 deletions.
34 changes: 23 additions & 11 deletions .aliases
Expand Up @@ -12,12 +12,15 @@ alias mv='mv -v'
alias rm='rm -i -v'
alias cp='cp -v'

alias chmox='chmod -x'

alias cask='brew cask' # i <3 u cask
alias where=which # sometimes i forget
alias brwe=brew #typos

alias hosts='sudo $EDITOR /etc/hosts' # yes I occasionally 127.0.0.1 twitter.com ;)

alias ag='ag -f --hidden'

###
# time to upgrade `ls`
Expand All @@ -42,16 +45,25 @@ alias c='pygmentize -O style=monokai -f console256 -g'
###
# GIT STUFF

function clone() {
git clone --depth=1 $1
cd $(basename ${1%.*})
yarn install
}
alias push="git push"

# Undo a `git push`
alias undopush="git push -f origin HEAD^:master"

# git root
alias gr='[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`'

alias master="git checkout master"

# Networking. IP address, dig, DNS
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias dig="dig +nocmd any +multiline +noall +answer"
# alias dig="dig +nocmd any +multiline +noall +answer"
# wget sucks with certificates. Let's keep it simple.
alias wget="curl -O"

# Recursively delete `.DS_Store` files
alias cleanup_dsstore="find . -name '*.DS_Store' -type f -ls -delete"
Expand All @@ -68,14 +80,14 @@ alias ungz="gunzip -k"
alias fs="stat -f \"%z bytes\""

# Empty the Trash on all mounted volumes and the main HDD. then clear the useless sleepimage
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; rm -rfv ~/.Trash; sudo rm /private/var/vm/sleepimage"
alias emptytrash=" \
sudo rm -rfv /Volumes/*/.Trashes; \
rm -rfv ~/.Trash/*; \
sudo rm -v /private/var/vm/sleepimage; \
rm -rv \"/Users/paulirish/Library/Application Support/stremio/Cache\"; \
rm -rv \"/Users/paulirish/Library/Application Support/stremio/stremio-cache\" \
"

# Update installed Ruby gems, Homebrew, npm, and their installed packages
alias brew_update="brew -v update; brew -v upgrade --all; brew cleanup; brew cask cleanup; brew prune; brew doctor"
alias update_brew_npm_gem='brew_update; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update --no-rdoc --no-ri'


# One of @janmoesen’s ProTip™s
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
alias "$method"="lwp-request -m '$method'"
done
alias brew_update="brew -v update; brew upgrade --force-bottle --cleanup; brew cleanup; brew cask cleanup; brew prune; brew doctor; npm-check -g -u"
alias update_brew_npm_gem='brew_update; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update --no-document'
43 changes: 29 additions & 14 deletions .bash_profile
Expand Up @@ -12,7 +12,6 @@ case $- in
*i*) source ~/.extra
esac


# generic colouriser
GRC=`which grc`
if [ "$TERM" != dumb ] && [ -n "$GRC" ]
Expand All @@ -37,15 +36,27 @@ export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
## gotta tune that bash_history…
##

# timestamps for later analysis. www.debian-administration.org/users/rossen/weblog/1
# Enable history expansion with space
# E.g. typing !!<space> will replace the !! with your last command
bind Space:magic-space

# Use standard ISO 8601 timestamp
# %F equivalent to %Y-%m-%d
# %T equivalent to %H:%M:%S (24-hours format)
export HISTTIMEFORMAT='%F %T '

# keep history up to date, across sessions, in realtime
# http://unix.stackexchange.com/a/48113
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTCONTROL="erasedups:ignoreboth" # no duplicate entries
export HISTSIZE=100000 # big big history (default is 500)
export HISTFILESIZE=$HISTSIZE # big big history
which shopt > /dev/null && shopt -s histappend # append to history, don't overwrite it
type shopt &> /dev/null && shopt -s histappend # append to history, don't overwrite it

# Don't record some commands
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear"

# Save multi-line commands as one command
shopt -s cmdhist

# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
Expand All @@ -64,10 +75,10 @@ export NVM_DIR="$HOME/.nvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"


# z beats cd most of the time.
# github.com/rupa/z
source ~/code/z/z.sh

# z beats cd most of the time. `brew install z`
zpath="$(brew --prefix)/etc/profile.d/z.sh"
[ -s $zpath ] && source $zpath


##
Expand All @@ -87,17 +98,19 @@ fi;

# homebrew completion
if which brew > /dev/null; then
source `brew --repository`/Library/Contributions/brew_bash_completion.sh
source "$(brew --prefix)/etc/bash_completion.d/brew"
fi;

# hub completion
if which hub > /dev/null; then
source "$(brew --prefix)/etc/bash_completion.d/hub.bash_completion.sh";
fi;

# Enable tab completion for `g` by marking it as an alias for `git`
if type __git_complete &> /dev/null; then
__git_complete g __git_main
fi;

# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh

# Add tab completion for `defaults read|write NSGlobalDomain`
# You could just use `-g` instead, but I like being explicit
complete -W "NSGlobalDomain" defaults
Expand All @@ -110,9 +123,11 @@ complete -W "NSGlobalDomain" defaults
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob;

# Autocorrect typos in path names when using `cd`
# Correct spelling errors in arguments supplied to cd
shopt -s cdspell;

# Autocorrect on directory names to match a glob.
shopt -s dirspell 2> /dev/null



# Turn on recursive globbing (enables ** to recurse all directories)
shopt -s globstar 2> /dev/null
7 changes: 7 additions & 0 deletions .bash_prompt
Expand Up @@ -4,6 +4,13 @@
default_username='paulirish'


if which thefuck > /dev/null; then
eval "$(thefuck --alias)"
fi;

# Automatically trim long paths in the prompt (requires Bash 4.x)
PROMPT_DIRTRIM=2

if [[ -n "$ZSH_VERSION" ]]; then # quit now if in zsh
return 1 2> /dev/null || exit 1;
fi;
Expand Down
2 changes: 2 additions & 0 deletions .bashrc
@@ -1,2 +1,4 @@
[ -n "$PS1" ] && source ~/.bash_profile


# [ -f ~/.fzf.bash ] && source ~/.fzf.bash
15 changes: 0 additions & 15 deletions .config/fish/functions/append-to-path.fish

This file was deleted.

91 changes: 0 additions & 91 deletions .config/fish/functions/fish_prompt.fish

This file was deleted.

3 changes: 0 additions & 3 deletions .config/fish/functions/gr.fish

This file was deleted.

48 changes: 0 additions & 48 deletions .config/fish/functions/prepend-to-path.fish

This file was deleted.

0 comments on commit 80351dd

Please sign in to comment.