Skip to content

Instantly share code, notes, and snippets.

@pie6k
Last active July 6, 2017 21:31
Show Gist options
  • Save pie6k/7e63fb5db8e07eb3a93720b04b858365 to your computer and use it in GitHub Desktop.
Save pie6k/7e63fb5db8e07eb3a93720b04b858365 to your computer and use it in GitHub Desktop.
My configs
[alias]
# short aliases
st = status
co = checkout
ci = commit
cm = commit -m
br = branch
df = diff
lg = log -p
rso = remote show origin
me = config user.name
up = !git update
smash = !git ir
unstage = reset HEAD
undo-commit = reset --soft HEAD^
# interactive rebase
ir = !sh -c 'git rebase -i origin/${1-master}' -
# log aliases
log-branch = log origin/master..
blog = !git log-branch
mlog = !git log --committer=\"`git me`\"
# update current branch
update = !sh -c 'git fetch origin && git rebase -p origin/${1-master}' -
# creates a diff of current branch against supplied branch, usage: git export-branch [refbranch]
branch-name = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
export-branch = !git format-patch --stdout $1 > ~/branches/`git branch-name`.diff
# all commits that aren't merges on all branches
all = !git log --pretty=oneline --abbrev-commit --all --no-merges
# all commits today for only me
today = !git all --since='12am' --committer=\"`git me`\"
# today's commits without formatting or paging
today-text = !git --no-pager today --no-color
# files different from master on current branch
fdm = !git diff origin/master... --name-status
# last commit info in svn style
last = !git show --name-status
last-files = !git last --pretty=format:""
# last commit only certain type of modification
mlast = !git last-files | awk 'match($1, /M/) {print $2}'
alast = !git last-files | awk 'match($1, /A/) {print $2}'
dlast = !git last-files | awk 'match($1, /D/) {print $2}'
# `git done`
# current branch: merge, push, non-forced delete branch, show info
done = !sh -c '~/bin/done -d $1' -
# `git publish`
# current branch: merge, push, show info
publish = !sh -c '~/bin/done $1' -
# `git lint`
# lints all .php files that are different between current branch and origin/master
lint = !sh -c '~/bin/lint'
# `git spawn my-new-branch`
# make new branch based on master no matter which branch is checked out
spawn = !sh -c 'git checkout -b $1 ${2-master} && git config branch.$1.localmerge ${2-master}' -
# `git nuke my-old-branch`
# (Checks out master and does a non-forced delete on the branch entered)
nuke = !git co master && sh -c 'git br -d $1' -
# `git sync`
# update current branch and master
sync = !git update && \
git co master && \
git pull && \
git co @{-1}
# `git save`
# saves a commit in current branch: local branches you will be rebasing
save = !git commit -am \"save game\"
# attempt to cleanup some common problems
unfuck = !git fsck && git remote prune origin && git gc
# find the top level of current repository
top = !git rev-parse --show-toplevel
# list files changed by last commit in absolute location
list = !git show --pretty=format:"" --name-only | sed '/^$/d' | sed \"s|^|`git top`/|g\"
# give a count of dirty files
dirty = !git status --porcelain -uno | wc -l
# number of non-merge commits
peeps = !git log --pretty=format:"%Cblue%aN%Creset" --no-merges | sort | uniq -c | sort -rn
mergers = !git log --pretty=format:"%Cred%aN%Creset" --merges | sort | uniq -c | sort -rn
# awesome placeholders
crunk = status
deploy = status
crazy = status
stupid = status
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 20,
// font family with optional fallbacks
fontFamily:
'Operator Mono for Powerline, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: "rgba(248,28,229,0.8)",
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
cursorShape: "BLOCK",
// set to true for blinking cursor
cursorBlink: false,
// color of the text
foregroundColor: "#fff",
// terminal background color
backgroundColor: "#000",
// border color (window, tabs)
borderColor: "#333",
// custom css to embed in the main window
css: ``,
// custom css to embed in the terminal window
termCSS: `
.unicode-node {
text-indent: -0.5px;
}
`,
hyperBorder: {
borderColors: ["#5B3FAA", "#771AA4"],
borderWidth: "8px"
},
// set to `true` (without backticks) if you're using a Linux setup that doesn't show native menus
// default: `false` on Linux, `true` on Windows (ignored on macOS)
showHamburgerMenu: "",
// set to `false` if you want to hide the minimize, maximize and close buttons
// additionally, set to `'left'` if you want them on the left, like in Ubuntu
// default: `true` on windows and Linux (ignored on macOS)
showWindowControls: "",
// custom padding (css format, i.e.: `top right bottom left`)
padding: "12px 14px",
// the full list. if you're going to provide the full color palette,
// including the 6 x 6 color cubes and the grayscale map, just provide
// an array here instead of a color map object
colors: {
black: "#000000",
red: "#ff0000",
green: "#33ff00",
yellow: "#ffff00",
blue: "#0066ff",
magenta: "#cc00ff",
cyan: "#00ffff",
white: "#d0d0d0",
lightBlack: "#808080",
lightRed: "#ff0000",
lightGreen: "#33ff00",
lightYellow: "#ffff00",
lightBlue: "#0066ff",
lightMagenta: "#cc00ff",
lightCyan: "#00ffff",
lightWhite: "#ffffff"
},
// the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
// if left empty, your system's login shell will be used by default
// make sure to use a full path if the binary name doesn't work
// (e.g `C:\\Windows\\System32\\bash.exe` instead of just `bash.exe`)
// if you're using powershell, make sure to remove the `--login` below
shell: "/bin/zsh",
// for setting shell arguments (i.e. for using interactive shellArgs: ['-i'])
// by default ['--login'] will be used
shellArgs: ["--login"],
// for environment variables
env: {},
// set to false for no bell
bell: "SOUND",
// if true, selected text will automatically be copied to the clipboard
copyOnSelect: false
// if true, on right click selected text will be copied or pasted if no
// selection is present (true by default on Windows)
// quickEdit: true
// URL to custom bell
// bellSoundURL: 'http://example.com/bell.mp3',
// for advanced config flags please refer to https://hyper.is/#cfg
},
// a list of plugins to fetch and install from npm
// format: [@org/]project[#version]
// examples:
// `hyperpower`
// `@company/project`
// `project#1.0.1`
plugins: [
"hyper-dracula",
"hyperpower",
"hyperborder",
"hypercwd",
"hyperlinks",
"hyper-tabs-enhanced"
],
// in development, you can create a directory under
// `~/.hyper_plugins/local/` and include it here
// to load it and avoid it being `npm install`ed
localPlugins: []
};
{
"workbench.colorTheme": "Dracula",
"workbench.sideBar.location": "left",
"editor.fontSize": 16,
"editor.fontFamily": "Operator Mono for Powerline, Operator Mono, Menlo, Monaco, 'Courier New', monospace",
"workbench.iconTheme": "vscode-great-icons",
"editor.formatOnSave": true,
"sync.gist": "928b86aba1e6bd7f574ab855565f3356",
"sync.lastUpload": "2017-07-06T18:22:27.306Z",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.lastDownload": "2017-06-23T06:56:10.955Z",
"sync.forceDownload": false,
"sync.anonymousGist": false,
"sync.host": "",
"sync.pathPrefix": "",
"sync.quietSync": false,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/build": true,
"**/dist": true
},
"search.useIgnoreFilesByDefault": true,
"editor.rulers": [80, 100],
"editor.tabSize": 2,
"editor.minimap.enabled": false,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
"editor.renderWhitespace": "all",
"editor.renderControlCharacters": true,
"sync.askGistName": false,
"vscode_custom_css.imports": [
"file:///Users/adampietrasiak/.vscode/style.css"
]
}
#
# Executes commands at login pre-zshrc.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
#
# Browser
#
if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi
#
# Editors
#
export EDITOR='nano'
export VISUAL='nano'
export PAGER='less'
#
# Language
#
if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
fi
#
# Paths
#
# Ensure path arrays do not contain duplicates.
typeset -gU cdpath fpath mailpath path
# Set the the list of directories that cd searches.
# cdpath=(
# $cdpath
# )
# Set the list of directories that Zsh searches for programs.
path=(
/usr/local/{bin,sbin}
$path
)
#
# Less
#
# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'
# Set the Less input preprocessor.
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi
#
# Temporary Files
#
#
# Set TMPDIR if the variable is not set/empty or the directory doesn't exist
if [[ -z "${TMPDIR}" ]]; then
export TMPDIR="/tmp/zsh-${UID}"
fi
if [[ ! -d "${TMPDIR}" ]]; then
mkdir -m 700 "${TMPDIR}"
fi
### Others
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/share/python:$PATH"
export PATH="/usr/local/share/npm/bin:$PATH"
export PATH="$PATH:$(yarn global bin)"
### Uncomment if will need nvm - it slows startup strongly
# export NVM_DIR="~/.nvm"
# source $(brew --prefix nvm)/nvm.sh
.monaco-shell {
font-family: 'Lucida Grande', sans-serif;
}
.monaco-split-view > .split-view-view > .header {
text-transform: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment