refactor(core): start to make dotfiles public
This is the first commit that brings the privet dotfiles to a public reop previously this was all one puppet module. Now this has been split out so I can put all of the private files in a private puppet module
This commit is contained in:
parent
f3cfa13ead
commit
80239af169
158 changed files with 3534 additions and 1222 deletions
|
|
@ -1,6 +0,0 @@
|
|||
[Dolphin]
|
||||
Timestamp=2016,11,20,7,37,13
|
||||
Version=3
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
122
.gitignore
vendored
Normal file
122
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/puppet,emacs,code,vim,linux
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=puppet,emacs,code,vim,linux
|
||||
|
||||
### Application ###
|
||||
modules
|
||||
.resource_types
|
||||
info.rb
|
||||
.rerun.json
|
||||
|
||||
### Code ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
### Emacs ###
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
|
||||
### Linux ###
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
### Puppet ###
|
||||
# gitignore template for Puppet modules
|
||||
# website: https://forge.puppet.com/
|
||||
|
||||
# Built packages
|
||||
pkg/*
|
||||
|
||||
# Should run on multiple platforms so don't check in
|
||||
Gemfile.lock
|
||||
|
||||
# Tests
|
||||
spec/fixtures/*
|
||||
coverage/*
|
||||
|
||||
# Third-party
|
||||
vendor/*
|
||||
.bundle/*
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/puppet,emacs,code,vim,linux
|
||||
75
.gitmodules
vendored
75
.gitmodules
vendored
|
|
@ -1,75 +0,0 @@
|
|||
[submodule "dotfiles/vim/bundle/auto-pairs"]
|
||||
path = dotfiles/vim/bundle/auto-pairs
|
||||
url = git://github.com/jiangmiao/auto-pairs.git
|
||||
[submodule "dotfiles/vim/bundle/calendar.vim"]
|
||||
path = dotfiles/vim/bundle/calendar.vim
|
||||
url = https://github.com/itchyny/calendar.vim
|
||||
[submodule "dotfiles/vim/bundle/ctrlp.vim"]
|
||||
path = dotfiles/vim/bundle/ctrlp.vim
|
||||
url = https://github.com/kien/ctrlp.vim.git
|
||||
[submodule "dotfiles/vim/bundle/indentLine"]
|
||||
path = dotfiles/vim/bundle/indentLine
|
||||
url = https://github.com/Yggdroot/indentLine.git
|
||||
[submodule "dotfiles/vim/bundle/nerdcommenter"]
|
||||
path = dotfiles/vim/bundle/nerdcommenter
|
||||
url = https://github.com/scrooloose/nerdcommenter.git
|
||||
[submodule "dotfiles/vim/bundle/nerdtree"]
|
||||
path = dotfiles/vim/bundle/nerdtree
|
||||
url = https://github.com/scrooloose/nerdtree.git
|
||||
[submodule "dotfiles/vim/bundle/pdv"]
|
||||
path = dotfiles/vim/bundle/pdv
|
||||
url = https://github.com/tobyS/pdv.git
|
||||
[submodule "dotfiles/vim/bundle/sparkup"]
|
||||
path = dotfiles/vim/bundle/sparkup
|
||||
url = https://github.com/rstacruz/sparkup.git
|
||||
[submodule "dotfiles/vim/bundle/unite.vim"]
|
||||
path = dotfiles/vim/bundle/unite.vim
|
||||
url = https://github.com/Shougo/unite.vim.git
|
||||
[submodule "dotfiles/vim/bundle/vdebug"]
|
||||
path = dotfiles/vim/bundle/vdebug
|
||||
url = https://github.com/joonty/vdebug.git
|
||||
[submodule "dotfiles/vim/bundle/vim-airline"]
|
||||
path = dotfiles/vim/bundle/vim-airline
|
||||
url = https://github.com/vim-airline/vim-airline
|
||||
[submodule "dotfiles/vim/bundle/vim-easy-align"]
|
||||
path = dotfiles/vim/bundle/vim-easy-align
|
||||
url = https://github.com/junegunn/vim-easy-align.git
|
||||
[submodule "dotfiles/vim/bundle/vim-fugitive"]
|
||||
path = dotfiles/vim/bundle/vim-fugitive
|
||||
url = git://github.com/tpope/vim-fugitive.git
|
||||
[submodule "dotfiles/vim/bundle/vim-gitgutter"]
|
||||
path = dotfiles/vim/bundle/vim-gitgutter
|
||||
url = git://github.com/airblade/vim-gitgutter.git
|
||||
[submodule "dotfiles/vim/bundle/vim-grammarous"]
|
||||
path = dotfiles/vim/bundle/vim-grammarous
|
||||
url = https://github.com/rhysd/vim-grammarous.git
|
||||
[submodule "dotfiles/vim/bundle/vim-indent-guides"]
|
||||
path = dotfiles/vim/bundle/vim-indent-guides
|
||||
url = git://github.com/nathanaelkane/vim-indent-guides.git
|
||||
[submodule "dotfiles/vim/bundle/vim-multiple-cursors"]
|
||||
path = dotfiles/vim/bundle/vim-multiple-cursors
|
||||
url = https://github.com/terryma/vim-multiple-cursors.git
|
||||
[submodule "dotfiles/vim/bundle/vim-surround"]
|
||||
path = dotfiles/vim/bundle/vim-surround
|
||||
url = git://github.com/tpope/vim-surround.git
|
||||
[submodule "dotfiles/vim/bundle/vim-tmux-navigator"]
|
||||
path = dotfiles/vim/bundle/vim-tmux-navigator
|
||||
url = https://github.com/christoomey/vim-tmux-navigator.git
|
||||
[submodule "dotfiles/vim/bundle/vimwiki"]
|
||||
path = dotfiles/vim/bundle/vimwiki
|
||||
url = https://github.com/vimwiki/vimwiki.git
|
||||
[submodule "dotfiles/vim/bundle/vmustache"]
|
||||
path = dotfiles/vim/bundle/vmustache
|
||||
url = https://github.com/tobyS/vmustache.git
|
||||
[submodule "dotfiles/vim/bundle/ultisnips"]
|
||||
path = dotfiles/vim/bundle/ultisnips
|
||||
url = https://github.com/SirVer/ultisnips.git
|
||||
[submodule "dotfiles/vim/bundle/vim-airline-themes"]
|
||||
path = dotfiles/vim/bundle/vim-airline-themes
|
||||
url = https://github.com/vim-airline/vim-airline-themes.git
|
||||
[submodule "dotfiles\\vim\\bundle\\ultisnips"]
|
||||
path = dotfiles\\vim\\bundle\\ultisnips
|
||||
url = https://github.com/SirVer/ultisnips.git
|
||||
[submodule "dotfiles\\vim\\bundle\\vim-airline-themes"]
|
||||
path = dotfiles\\vim\\bundle\\vim-airline-themes
|
||||
url = https://github.com/vim-airline/vim-airline-themes.git
|
||||
15
Puppetfile
Normal file
15
Puppetfile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# Puppet std lib
|
||||
#
|
||||
mod 'puppetlabs-stdlib', '6.3.0'
|
||||
|
||||
#
|
||||
# Docker modules
|
||||
#
|
||||
mod 'puppetlabs-apt', '7.4.2'
|
||||
mod 'puppetlabs-docker', '3.10.0'
|
||||
|
||||
#
|
||||
# VSC Repo to install all the git repos
|
||||
#
|
||||
mod 'puppetlabs-vcsrepo', '3.1.1'
|
||||
0
bolt.yaml
Normal file
0
bolt.yaml
Normal file
4
data/common.yaml
Normal file
4
data/common.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
user: ade
|
||||
user_name: Ade Attwood
|
||||
email: code@adeattwood.co.uk
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Dolphin]
|
||||
Timestamp=2016,11,18,5,34,12
|
||||
Version=3
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
!xrdb -merge ~/.Xresources
|
||||
! Use a nice truetype font and size by default...
|
||||
xterm*faceName: DejaVu Sans Mono Book
|
||||
!xterm*faceSize: 11
|
||||
xterm*faceSize: 10
|
||||
|
||||
! Every shell is a login shell by default (for inclusion of all necessary environment variables)
|
||||
!xterm*loginshell: true
|
||||
|
||||
! I like a LOT of scrollback...
|
||||
xterm*savelines: 16384
|
||||
|
||||
! double-click to select whole URLs :D
|
||||
xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
|
||||
|
||||
xterm*termName: xterm-256color
|
||||
|
||||
! Base16 Railscasts
|
||||
! Scheme: Ryan Bates (http://railscasts.com)
|
||||
|
||||
#define base00 #2b2b2b
|
||||
#define base01 #272935
|
||||
#define base02 #3a4055
|
||||
#define base03 #5a647e
|
||||
#define base04 #d4cfc9
|
||||
#define base05 #e6e1dc
|
||||
#define base06 #f4f1ed
|
||||
#define base07 #f9f7f3
|
||||
#define base08 #da4939
|
||||
#define base09 #cc7833
|
||||
#define base0A #ffc66d
|
||||
#define base0B #a5c261
|
||||
#define base0C #519f50
|
||||
#define base0D #6d9cbe
|
||||
#define base0E #b6b3eb
|
||||
#define base0F #bc9458
|
||||
|
||||
*.foreground: base05
|
||||
*.background: base00
|
||||
*.cursorColor: base05
|
||||
|
||||
*.color0: base00
|
||||
*.color1: base08
|
||||
*.color2: base0B
|
||||
*.color3: base0A
|
||||
*.color4: base0D
|
||||
*.color5: base0E
|
||||
*.color6: base0C
|
||||
*.color7: base05
|
||||
|
||||
*.color8: base03
|
||||
*.color9: base08
|
||||
*.color10: base0B
|
||||
*.color11: base0A
|
||||
*.color12: base0D
|
||||
*.color13: base0E
|
||||
*.color14: base0C
|
||||
*.color15: base07
|
||||
|
||||
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
|
||||
! use 'shell' template to set these if necessary
|
||||
*.color16: base09
|
||||
*.color17: base0F
|
||||
*.color18: base01
|
||||
*.color19: base02
|
||||
*.color20: base04
|
||||
*.color21: base06
|
||||
149
dotfiles/bashrc
149
dotfiles/bashrc
|
|
@ -1,149 +0,0 @@
|
|||
# costume user bin dir
|
||||
export PATH=$PATH:~/.composer/vendor/bin
|
||||
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# map esc to caps lock
|
||||
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
||||
|
||||
|
||||
export PHPBREW_SET_PROMPT=1
|
||||
source "$HOME/.phpbrew/bashrc"
|
||||
|
||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||
eval "$(rbenv init -)"
|
||||
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
|
||||
|
||||
|
||||
export base00="#2b303b"
|
||||
export base01="#343d46"
|
||||
export base02="#4f5b66"
|
||||
export base03="#65737e"
|
||||
export base04="#a7adba"
|
||||
export base05="#c0c5ce"
|
||||
export base06="#dfe1e8"
|
||||
export base07="#eff1f5"
|
||||
export base08="#bf616a"
|
||||
export base09="#d08770"
|
||||
export base0A="#ebcb8b"
|
||||
export base0B="#a3be8c"
|
||||
export base0C="#96b5b4"
|
||||
export base0D="#8fa1b3"
|
||||
export base0E="#b48ead"
|
||||
export base0F="#ab7967"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
! /bin/bash
|
||||
|
||||
sudo service apache2 restart
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
tmux new-window
|
||||
tmux rename-window 'MySql'
|
||||
tmux send-keys "mysql -uroot -proot" C-m
|
||||
tmux send-keys "pager vim -" C-m
|
||||
tmux split-window -h
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
tmux new-window
|
||||
tmux rename-window 'Servers'
|
||||
|
||||
tmux send-keys "php -S http://localhost:8080"
|
||||
|
||||
tmux split-window -h
|
||||
|
||||
tmux send-keys "cd ~/.selenium-server" C-m
|
||||
tmux send-keys "java -jar ~/.selenium-server/selenium-server-standalone-2.53.1.jar -Dwebdriver.chrome.drive=chromedriver"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"require": {
|
||||
"phpunit/phpunit": "^5.3"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,134 +0,0 @@
|
|||
# split windows like vim
|
||||
# vim's definition of a horizontal/vertical split is reversed from tmux's
|
||||
bind s split-window -v
|
||||
bind v split-window -h
|
||||
|
||||
# Smart pane switching with awareness of vim splits
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
|
||||
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
||||
|
||||
# resize panes like vim
|
||||
# feel free to change the "1" to however many lines you want to resize by, only
|
||||
# one at a time can be slow
|
||||
bind < resize-pane -L 1
|
||||
bind > resize-pane -R 1
|
||||
bind - resize-pane -D 1
|
||||
bind + resize-pane -U 1
|
||||
|
||||
# bind : to command-prompt like vim
|
||||
# this is the default in tmux already
|
||||
bind : command-prompt
|
||||
|
||||
# vi-style controls for copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# set 256 color to use color scheme
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -g terminal-overrides 'xteram*:colors=256'
|
||||
|
||||
# set windows so they dont resize to the smallest
|
||||
setw -g aggressive-resize on
|
||||
|
||||
######################
|
||||
### DESIGN CHANGES ###
|
||||
######################
|
||||
|
||||
# panes
|
||||
set -g pane-border-fg black
|
||||
set -g pane-active-border-fg brightred
|
||||
|
||||
## Status bar design
|
||||
# status line
|
||||
set -g status-utf8 on
|
||||
set -g status-justify left
|
||||
set -g status-bg default
|
||||
set -g status-fg colour12
|
||||
set -g status-interval 2
|
||||
|
||||
# messaging
|
||||
set -g message-fg black
|
||||
set -g message-bg yellow
|
||||
set -g message-command-fg blue
|
||||
set -g message-command-bg black
|
||||
|
||||
#window mode
|
||||
setw -g mode-bg colour6
|
||||
setw -g mode-fg colour0
|
||||
|
||||
# window status
|
||||
setw -g window-status-format " #F#I:#W#F "
|
||||
setw -g window-status-current-format " #F#I:#W#F "
|
||||
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
|
||||
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
|
||||
setw -g window-status-current-bg colour0
|
||||
setw -g window-status-current-fg colour11
|
||||
setw -g window-status-current-attr dim
|
||||
setw -g window-status-bg green
|
||||
setw -g window-status-fg black
|
||||
setw -g window-status-attr reverse
|
||||
|
||||
# Info on left (I don't have a session display for now)
|
||||
set -g status-left ''
|
||||
|
||||
# loud or quiet?
|
||||
set-option -g visual-activity off
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-window-option -g monitor-activity off
|
||||
set-option -g bell-action none
|
||||
|
||||
#set -g default-terminal "screen-256color"
|
||||
|
||||
# The modes {
|
||||
setw -g clock-mode-colour colour135
|
||||
setw -g mode-attr bold
|
||||
setw -g mode-fg colour196
|
||||
setw -g mode-bg colour238
|
||||
|
||||
# }
|
||||
# The panes {
|
||||
|
||||
set -g pane-border-bg colour235
|
||||
set -g pane-border-fg colour238
|
||||
set -g pane-active-border-bg colour236
|
||||
set -g pane-active-border-fg colour51
|
||||
|
||||
# }
|
||||
# The statusbar {
|
||||
|
||||
set -g status-position bottom
|
||||
set -g status-bg colour234
|
||||
set -g status-fg colour137
|
||||
set -g status-attr dim
|
||||
set -g status-left ''
|
||||
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
|
||||
set -g status-right-length 50
|
||||
set -g status-left-length 20
|
||||
|
||||
setw -g window-status-current-fg colour81
|
||||
setw -g window-status-current-bg colour238
|
||||
setw -g window-status-current-attr bold
|
||||
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
|
||||
|
||||
setw -g window-status-fg colour138
|
||||
setw -g window-status-bg colour235
|
||||
setw -g window-status-attr none
|
||||
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
|
||||
|
||||
setw -g window-status-bell-attr bold
|
||||
setw -g window-status-bell-fg colour255
|
||||
setw -g window-status-bell-bg colour1
|
||||
|
||||
# }
|
||||
# The messages {
|
||||
|
||||
set -g message-attr bold
|
||||
set -g message-fg colour232
|
||||
set -g message-bg colour166
|
||||
|
||||
# }
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# ~/.tmuxinator/fullScreenDev.yml
|
||||
|
||||
name: fullScreenDev
|
||||
root: <%= @args[0] %>
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Runs before everything. Use it to start daemons etc.
|
||||
# pre: sudo /etc/rc.d/mysqld start
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
# startup_window: logs
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
# Runs after everything. Use it to attach to tmux with custom options etc.
|
||||
# post: tmux -CC attach -t myLaravel
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
layout: a989,283x58,0,0{212x58,0,0,0,70x58,213,0[70x29,213,0,1,70x28,213,30,2]}
|
||||
panes:
|
||||
- vim --servername vim
|
||||
- vifm
|
||||
-
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# ~/.tmuxinator/php.yml
|
||||
|
||||
name: php
|
||||
root: <%= @args[0] %>
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Runs before everything. Use it to start daemons etc.
|
||||
# pre: sudo /etc/rc.d/mysqld start
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
# startup_window: logs
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
# Runs after everything. Use it to attach to tmux with custom options etc.
|
||||
# post: tmux -CC attach -t php
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
layout: 2178,136x55,0,0[136x45,0,0,0,136x9,0,46,4]
|
||||
panes:
|
||||
- vim
|
||||
-
|
||||
- git:
|
||||
- browser: google-chrome http://localhost
|
||||
- Tasks:
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# ~/.tmuxinator/rails.yml
|
||||
|
||||
name: rails
|
||||
root: <%= @args[0] %>
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Runs before everything. Use it to start daemons etc.
|
||||
# pre: sudo /etc/rc.d/mysqld start
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
# startup_window: logs
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
# Runs after everything. Use it to attach to tmux with custom options etc.
|
||||
# post: tmux -CC attach -t rails
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
layout: 2178,136x55,0,0[136x45,0,0,0,136x9,0,46,4]
|
||||
panes:
|
||||
- vim
|
||||
-
|
||||
- git:
|
||||
- server: rails s
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# ~/.tmuxinator/webDev.yml
|
||||
|
||||
name: webDev
|
||||
root: <%= @args[0] %>
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Runs before everything. Use it to start daemons etc.
|
||||
# pre: sudo /etc/rc.d/mysqld start
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
# startup_window: logs
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
# Runs after everything. Use it to attach to tmux with custom options etc.
|
||||
# post: tmux -CC attach -t webDev
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
layout: 2178,136x55,0,0[136x45,0,0,0,136x9,0,46,4]
|
||||
panes:
|
||||
- vim
|
||||
-
|
||||
- git:
|
||||
- browser: google-chrome http://localhost
|
||||
- Tasks:
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
snippet php "php tag" i
|
||||
<?php $1 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpe "php echo tag" i
|
||||
<?= $1 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpif "php if statment" b
|
||||
<?php if($1): ?>
|
||||
$2
|
||||
<?php endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpife "php if else statment" b
|
||||
<? if ($1): ?>
|
||||
$2
|
||||
<? else: ?>
|
||||
$3
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpifeif "php if else if statment" b
|
||||
<? if ($1): ?>
|
||||
$2
|
||||
<? elseif ($3): ?>
|
||||
$4
|
||||
<? else: ?>
|
||||
$5
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpfe "php foreach" b
|
||||
<?php foreach(${1:$array} as ${2:$key}=>${3:$value}): ?>
|
||||
$4
|
||||
<?php endforeach; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpf "php for loop" b
|
||||
<?php for ($i = ${1:1}; $i <= ${2:count}; $i++): ?>
|
||||
$3
|
||||
<?php endfor; ?>
|
||||
endsnippet
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 5979999a17c7330abfe1d73fd3c8d72f09d77334
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f49bd337a4643bb58df0fa4df230d60bdfeef022
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 2a2617310b0fb4c0daf02be2ba465fada257f2d0
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 1f4bfd59920c101a30a74a07b824608a6e65f3fe
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 15445be5fb2559829ac7a1f05af5d713586e8ec9
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 0e4b5aa689400246069953147ce53905c912087d
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d400a570bf64b0c216aa7c8e1795820b911a7404
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 9a670c502b5a920a7155c2894a321beaf58b1c26
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 5fd81feec7ff3f94173ecb10e3dee98aaef26e5d
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 24495d14a7af9b7c707c5ca5e0b30d28eb024df1
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 70c16f4c46f11395bbbc30b2f0a6822669e7df87
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e03e9f62d25f9afb04c88ec6ca66cf2098242016
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 0cb6b98fc155717b0a56c110551ac57d1d951ddb
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3439f999b138254e4bb56187fc91f91f545b4b12
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 377c71d9823be32c021a597d8d18c3234ed567c1
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f9bbf94e9a89fd6bd69aef6f372a3f66a2bc3be7
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 018298ead9d3aa9cd3b4ae222f81022a33978b09
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 25b567baf712a7e9bc8f3c9ca816bd579363109b
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 2d05440ad23f97a7874ebd9b5de3a0e65d25d85c
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e13914d89e9413cfa449f0c3daff18691356f2d1
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 4831384ab9f1c40c9e433857d958c4d9a7beb8ec
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d39f77bafef57ba7af304c74b3cfc91a83fd86e0
|
||||
175
dotfiles/vimrc
175
dotfiles/vimrc
|
|
@ -1,175 +0,0 @@
|
|||
" important
|
||||
" --------------------------------------------------------------------------------
|
||||
call pathogen#infect()
|
||||
set nocompatible
|
||||
set runtimepath^=~/.vim/bundle/ctrlp.vim
|
||||
filetype plugin on
|
||||
set t_Co=256
|
||||
" --------------------------------------------------------------------------------
|
||||
" not sorted
|
||||
" --------------------------------------------------------------------------------
|
||||
autocmd BufNewFile,BufRead *.phtml set ft=html
|
||||
" --------------------------------------------------------------------------------
|
||||
|
||||
" --------------------------------------------------------------------------------
|
||||
set showmatch
|
||||
set incsearch
|
||||
set hlsearch
|
||||
" --------------------------------------------------------------------------------
|
||||
" tags
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" displaying text
|
||||
" --------------------------------------------------------------------------------
|
||||
set linebreak
|
||||
set nowrap
|
||||
set nu
|
||||
set rnu
|
||||
" --------------------------------------------------------------------------------
|
||||
" highlighting and spelling
|
||||
" --------------------------------------------------------------------------------
|
||||
set cursorline
|
||||
syntax on
|
||||
" --------------------------------------------------------------------------------
|
||||
" multiple windows
|
||||
" --------------------------------------------------------------------------------
|
||||
set laststatus=2
|
||||
" --------------------------------------------------------------------------------
|
||||
" multiple tab pages
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" terminal
|
||||
" --------------------------------------------------------------------------------
|
||||
set title
|
||||
" --------------------------------------------------------------------------------
|
||||
" using the mouse
|
||||
" --------------------------------------------------------------------------------
|
||||
"set mouse=a
|
||||
" --------------------------------------------------------------------------------
|
||||
" printing
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" messages and info
|
||||
" --------------------------------------------------------------------------------
|
||||
set ruler
|
||||
set showcmd
|
||||
" --------------------------------------------------------------------------------
|
||||
" selecting text
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" editing text
|
||||
" --------------------------------------------------------------------------------
|
||||
set matchpairs+=<:>
|
||||
" --------------------------------------------------------------------------------
|
||||
" tabs and indenting
|
||||
" --------------------------------------------------------------------------------
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set autoindent
|
||||
filetype plugin indent on
|
||||
" --------------------------------------------------------------------------------
|
||||
" folding
|
||||
" --------------------------------------------------------------------------------
|
||||
set foldmethod=indent
|
||||
set foldlevel=1
|
||||
set foldnestmax=2
|
||||
"set nofen
|
||||
" --------------------------------------------------------------------------------
|
||||
" diff mode
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" mapping
|
||||
" --------------------------------------------------------------------------------
|
||||
inoremap EE <esc>$a
|
||||
inoremap ;; <esc>$a;
|
||||
inoremap jj <esc>:w<cr>
|
||||
nnoremap <Leader>p :set paste<CR>o<esc>"*]p:set nopaste<cr>"
|
||||
nnoremap <Leader>b :ls<CR>:b
|
||||
nmap <silent> <Leader>o :NERDTreeToggle<CR>
|
||||
nmap <silent> <Leader>s ]sz=
|
||||
nmap <Leader>r :BLReloadPage<cr>
|
||||
nnoremap <silent> <Right> :vertical resize +5<cr>
|
||||
noremap <silent> <Left> :vertical resize -5<cr>
|
||||
nnoremap <silent> <Up> :resize +5<cr>
|
||||
nnoremap <silent> <Down> :resize -5<cr>
|
||||
nnoremap <leader>d :call pdv#DocumentWithSnip()<cr>
|
||||
nnoremap <leader>t :! vendor/bin/phpunit<cr>
|
||||
nnoremap <leader>tf :! vendor/bin/phpunit %<cr>
|
||||
" --------------------------------------------------------------------------------
|
||||
" reading and writing files
|
||||
" --------------------------------------------------------------------------------
|
||||
set autoread
|
||||
" --------------------------------------------------------------------------------
|
||||
" the swap file
|
||||
" --------------------------------------------------------------------------------
|
||||
set noswapfile
|
||||
" --------------------------------------------------------------------------------
|
||||
" command line editing
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" executing external commands
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" running make and jumping to errors
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" language specific
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" multi-byte characters
|
||||
" --------------------------------------------------------------------------------
|
||||
set fileencoding=utf-8
|
||||
set encoding=utf-8
|
||||
" --------------------------------------------------------------------------------
|
||||
" variousexecute
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" plugins
|
||||
" --------------------------------------------------------------------------------
|
||||
|
||||
" ultisnips
|
||||
let g:UltiSnipsSnippetsDir = "~/.vim/UltiSnips"
|
||||
let g:snips_author = "AdeAttwood"
|
||||
let g:snips_email = "attwood16@googlemail.com"
|
||||
|
||||
" vimwiki
|
||||
let g:vimwiki_list = [{
|
||||
\ 'path': '$HOME/vimwiki/',
|
||||
\ 'template_path': '$HOME/vimwiki/templates',
|
||||
\ 'template_default': 'default',
|
||||
\ 'template_ext': '.html',
|
||||
\ 'auto_toc': 1}]
|
||||
|
||||
au BufRead,BufNewFile *.wiki set filetype=vimwiki
|
||||
function! ToggleCalendar()
|
||||
execute ":Calendar"
|
||||
if exists("g:calendar_open")
|
||||
if g:calendar_open == 1
|
||||
execute "q"
|
||||
unlet g:calendar_open
|
||||
else
|
||||
g:calendar_open = 1
|
||||
end
|
||||
else
|
||||
let g:calendar_open = 1
|
||||
end
|
||||
endfunction
|
||||
|
||||
autocmd FileType calendar nmap <buffer> <CR> :<C-u>call vimwiki#diary#calendar_action(b:calendar.day().get_day(), b:calendar.day().get_month(), b:calendar.day().get_year(), b:calendar.day().week(), "V")<CR>
|
||||
|
||||
" vim-airline
|
||||
let g:airline#extensions#branch#enabled=1
|
||||
let g:airline_theme='bubblegum'
|
||||
|
||||
" browserlink
|
||||
let g:bl_pagefiletype = ['html', 'javascript', 'css', 'scss', 'sass', 'php', 'phtml']
|
||||
|
||||
" pdv
|
||||
let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip"
|
||||
|
||||
" indent-guides
|
||||
let g:indent_guides_auto_colors = 1
|
||||
" --------------------------------------------------------------------------------
|
||||
" functions
|
||||
" --------------------------------------------------------------------------------
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
" important
|
||||
" --------------------------------------------------------------------------------
|
||||
call pathogen#infect()
|
||||
set nocompatible
|
||||
set runtimepath^=%homepath%\vimfiles\bundle\ctrlp.vim
|
||||
filetype plugin off
|
||||
set t_Co=256
|
||||
" --------------------------------------------------------------------------------
|
||||
" not sorted
|
||||
" --------------------------------------------------------------------------------
|
||||
autocmd BufNewFile,BufRead *.phtml set ft=html
|
||||
set guifont=Consolas:h12:cANSI
|
||||
colorscheme desert
|
||||
" --------------------------------------------------------------------------------
|
||||
|
||||
" --------------------------------------------------------------------------------
|
||||
set showmatch
|
||||
set incsearch
|
||||
set hlsearch
|
||||
" --------------------------------------------------------------------------------
|
||||
" tags
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" displaying text
|
||||
" --------------------------------------------------------------------------------
|
||||
set linebreak
|
||||
set nowrap
|
||||
set nu
|
||||
set rnu
|
||||
" --------------------------------------------------------------------------------
|
||||
" highlighting and spelling
|
||||
" --------------------------------------------------------------------------------
|
||||
set cursorline
|
||||
syntax on
|
||||
" --------------------------------------------------------------------------------
|
||||
" multiple windows
|
||||
" --------------------------------------------------------------------------------
|
||||
set laststatus=2
|
||||
" --------------------------------------------------------------------------------
|
||||
" multiple tab pages
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" terminal
|
||||
" --------------------------------------------------------------------------------
|
||||
set title
|
||||
" --------------------------------------------------------------------------------
|
||||
" using the mouse
|
||||
" --------------------------------------------------------------------------------
|
||||
"set mouse=a
|
||||
" --------------------------------------------------------------------------------
|
||||
" printing
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" messages and info
|
||||
" --------------------------------------------------------------------------------
|
||||
set ruler
|
||||
set showcmd
|
||||
" --------------------------------------------------------------------------------
|
||||
" selecting text
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" editing text
|
||||
" --------------------------------------------------------------------------------
|
||||
set matchpairs+=<:>
|
||||
" --------------------------------------------------------------------------------
|
||||
" tabs and indenting
|
||||
" --------------------------------------------------------------------------------
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set autoindent
|
||||
filetype plugin indent on
|
||||
" --------------------------------------------------------------------------------
|
||||
" folding
|
||||
" --------------------------------------------------------------------------------
|
||||
set foldmethod=indent
|
||||
set foldlevel=1
|
||||
set foldnestmax=2
|
||||
"set nofen
|
||||
" --------------------------------------------------------------------------------
|
||||
" diff mode
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" mapping
|
||||
" --------------------------------------------------------------------------------
|
||||
inoremap EE <esc>$a
|
||||
inoremap ;; <esc>$a;
|
||||
inoremap jj <esc>:w<cr>
|
||||
nnoremap <Leader>p :set paste<CR>o<esc>"*]p:set nopaste<cr>"
|
||||
nnoremap <Leader>b :ls<CR>:b
|
||||
nmap <silent> <Leader>o :NERDTreeToggle<CR>
|
||||
nmap <silent> <Leader>s ]sz=
|
||||
nmap <Leader>r :BLReloadPage<cr>
|
||||
nnoremap <silent> <Right> :vertical resize +5<cr>
|
||||
noremap <silent> <Left> :vertical resize -5<cr>
|
||||
nnoremap <silent> <Up> :resize +5<cr>
|
||||
nnoremap <silent> <Down> :resize -5<cr>
|
||||
nnoremap <leader>d :call pdv#DocumentWithSnip()<cr>
|
||||
nnoremap <leader>t :! vendor/bin/phpunit<cr>
|
||||
nnoremap <leader>tf :! vendor/bin/phpunit %<cr>
|
||||
" --------------------------------------------------------------------------------
|
||||
" reading and writing files
|
||||
" --------------------------------------------------------------------------------
|
||||
set autoread
|
||||
" --------------------------------------------------------------------------------
|
||||
" the swap file
|
||||
" --------------------------------------------------------------------------------
|
||||
set noswapfile
|
||||
" --------------------------------------------------------------------------------
|
||||
" command line editing
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" executing external commands
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" running make and jumping to errors
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" language specific
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" multi-byte characters
|
||||
" --------------------------------------------------------------------------------
|
||||
set fileencoding=utf-8
|
||||
set encoding=utf-8
|
||||
" --------------------------------------------------------------------------------
|
||||
" variousexecute
|
||||
" --------------------------------------------------------------------------------
|
||||
" --------------------------------------------------------------------------------
|
||||
" plugins
|
||||
" --------------------------------------------------------------------------------
|
||||
" git gutter
|
||||
"let g:gitgutter_git_executable="C:\tools\cmder\vendor\git-for-windows\bin\git.exe"
|
||||
"
|
||||
"let g:sparkupExecuteMapping='<C-D>'
|
||||
"let g:sparkupExecuteMapping = '<c-d>'
|
||||
|
||||
" ultisnips
|
||||
let g:UltiSnipsJumpForwardTrigger="<c-j>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
|
||||
let g:UltiSnipsSnippetsDir = "%homepath%\vimfiles\UltiSnips"
|
||||
let g:snips_author = "AdeAttwood"
|
||||
let g:snips_email = "attwood16@googlemail.com"
|
||||
|
||||
" vimwiki
|
||||
let g:vimwiki_list = [{
|
||||
\ 'path': '%homepath%\vimwiki\',
|
||||
\ 'template_path': '%homepath\vimwiki\templates',
|
||||
\ 'template_default': 'default',
|
||||
\ 'template_ext': '.html',
|
||||
\ 'auto_toc': 1}]
|
||||
|
||||
au BufRead,BufNewFile *.wiki set filetype=vimwiki
|
||||
function! ToggleCalendar()
|
||||
execute ":Calendar"
|
||||
if exists("g:calendar_open")
|
||||
if g:calendar_open == 1
|
||||
execute "q"
|
||||
unlet g:calendar_open
|
||||
else
|
||||
g:calendar_open = 1
|
||||
end
|
||||
else
|
||||
let g:calendar_open = 1
|
||||
end
|
||||
endfunction
|
||||
|
||||
autocmd FileType calendar nmap <buffer> <CR> :<C-u>call vimwiki#diary#calendar_action(b:calendar.day().get_day(), b:calendar.day().get_month(), b:calendar.day().get_year(), b:calendar.day().week(), "V")<CR>
|
||||
|
||||
" vim-airline
|
||||
let g:airline#extensions#branch#enabled=1
|
||||
let g:airline_theme='bubblegum'
|
||||
|
||||
" browserlink
|
||||
let g:bl_pagefiletype = ['html', 'javascript', 'css', 'scss', 'sass', 'php', 'phtml']
|
||||
|
||||
" pdv
|
||||
let g:pdv_template_dir = "C:/Users/ade/vimfiles/bundle/pdv/templates_snip"
|
||||
|
||||
" indent-guides
|
||||
let g:indent_guides_auto_colors = 1
|
||||
" --------------------------------------------------------------------------------
|
||||
" functions
|
||||
" --------------------------------------------------------------------------------
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=/home/ade/.oh-my-zsh
|
||||
|
||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||
# it'll load a random theme each time that oh-my-zsh is loaded.
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
#ZSH_THEME="robbyrussell"
|
||||
#ZSH_THEME="bira"
|
||||
#ZSH_THEME="crunch"
|
||||
ZSH_THEME="awesomepanda"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git composer tmux debian)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
#
|
||||
#map ecs to caps lock
|
||||
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
||||
16
hiera.yaml
Normal file
16
hiera.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
version: 5
|
||||
|
||||
defaults:
|
||||
datadir: 'data'
|
||||
|
||||
hierarchy:
|
||||
- name: 'Per-OS defaults'
|
||||
data_hash: yaml_data
|
||||
path: 'os/%{facts.os.family}.yaml'
|
||||
|
||||
- name: 'Yaml backend'
|
||||
data_hash: yaml_data
|
||||
paths:
|
||||
- 'nodes/%{trusted.certname}.yaml'
|
||||
- 'common.yaml'
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
# Move to home dir
|
||||
cd ~/
|
||||
|
||||
# Link dotfiles to the repo files
|
||||
ln -sf ~/.dotfiles/dotfiles/bashrc ~/.bashrc
|
||||
ln -sf ~/.dotfiles/dotfiles/tmux.conf ~/.tmux.conf
|
||||
ln -sf ~/.dotfiles/dotfiles/vimrc ~/.vimrc
|
||||
ln -sf ~/.dotfiles/dotfiles/Xresources ~/.Xresources
|
||||
ln -sf ~/.dotfiles/dotfiles/zshrc ~/.zshrc
|
||||
|
||||
# Link to the tmuxinator dir
|
||||
rm -rf ~/.tmuxinator
|
||||
ln -sf ~/.dotfiles/dotfiles/tmuxinator ~/.tmuxinator
|
||||
|
||||
# Link bin files
|
||||
sudo ln -sf ~/.dotfiles/dotfiles/bin/* /usr/local/bin
|
||||
|
||||
# Link to vim plugin autoloader
|
||||
mkdir -p ~/.vim/autoload
|
||||
ln -sf ~/.dotfiles/dotfiles/vim/autoload/pathogen.vim ~/.vim/autoload/pathogen.vim
|
||||
|
||||
# selenium server
|
||||
rm -rf ~/.selenium-server
|
||||
ln -sf ~/.dotfiles/dotfiles/selenium-server ~/.selenium-server
|
||||
|
||||
# Install vim plugins
|
||||
rm -rf ~/.vim/bundle
|
||||
mkdir -p ~/.vim/bundle
|
||||
cd ~/.dotfiles
|
||||
git submodule init
|
||||
git submodule update
|
||||
ln -sf ~/.dotfiles/dotfiles/vim/bundle/* ~/.vim/bundle
|
||||
cd ~/
|
||||
echo "All dotfiles have been installed"
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
git clone https://github.com/AdeAttwood/Dotfiles.git %USERPROFILE%\_dotfiles
|
||||
|
||||
:: vim
|
||||
|
||||
chdir %homepath%\_dotfiles
|
||||
git submodule init
|
||||
git submodule update
|
||||
chdir %homepath%
|
||||
|
||||
mkdir %homepath%\vimfiles
|
||||
mklink /D %homepath%\vimfiles\bundle %homepath%\_dotfiles\dotfiles\vim\bundle
|
||||
mklink /D %homepath%\vimfiles\autoload %homepath%\_dotfiles\dotfiles\vim\autoload
|
||||
mklink %homepath%\_vimrc %homepath%\_dotfiles\dotfiles\vimrc
|
||||
|
||||
25
manifests/root.pp
Normal file
25
manifests/root.pp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Disable filebucket by default for all File resources:
|
||||
# https://github.com/puppetlabs/docs-archive/blob/master/pe/2015.3/release_notes.markdown#filebucket-resource-no-longer-created-by-default
|
||||
File { backup => false }
|
||||
|
||||
node default {
|
||||
#
|
||||
# Find the username
|
||||
#
|
||||
# This can be set in the hira data so you can still do things as your user
|
||||
# when running puppet as root
|
||||
#
|
||||
$user = lookup('user', String, 'first', $id)
|
||||
notify { "Running as ${id} for ${user} with home of ${user_home}": }
|
||||
|
||||
#
|
||||
# Install all the packages that the workstation needs to run
|
||||
#
|
||||
include core::packages
|
||||
|
||||
#
|
||||
# Install docker and docker-compose
|
||||
#
|
||||
class { 'docker': version => 'latest' }
|
||||
class {'docker::compose': ensure => present }
|
||||
}
|
||||
25
manifests/workstation.pp
Normal file
25
manifests/workstation.pp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Disable filebucket by default for all File resources:
|
||||
# https://github.com/puppetlabs/docs-archive/blob/master/pe/2015.3/release_notes.markdown#filebucket-resource-no-longer-created-by-default
|
||||
File { backup => false }
|
||||
|
||||
node default {
|
||||
#
|
||||
# Find the username
|
||||
#
|
||||
# This can be set in the hira data so you can still do things as your user
|
||||
# when running puppet as root
|
||||
#
|
||||
$user = lookup('user', String, 'first', $id)
|
||||
notify { "Running as ${id} for ${user} with home of ${user_home}": }
|
||||
|
||||
#
|
||||
# Set up core components
|
||||
#
|
||||
include core::git
|
||||
include core::zsh
|
||||
include core::bin
|
||||
include core::vim
|
||||
include core::ssh
|
||||
include core::tmux
|
||||
include core::fonts
|
||||
}
|
||||
4
scripts/apply
Executable file
4
scripts/apply
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
bolt apply manifests/root.pp -vv --targets localhost --run-as root --sudo-password-prompt
|
||||
bolt apply manifests/workstation.pp -vv --targets localhost
|
||||
131
site-modules/core/files/bin/base16_theme
Executable file
131
site-modules/core/files/bin/base16_theme
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
#!/bin/sh
|
||||
# base16-shell (https://github.com/chriskempson/base16-shell)
|
||||
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
|
||||
# Ocean scheme by Chris Kempson (http://chriskempson.com)
|
||||
|
||||
color00="2b/30/3b" # Base 00 - Black
|
||||
color01="bf/61/6a" # Base 08 - Red
|
||||
color02="a3/be/8c" # Base 0B - Green
|
||||
color03="eb/cb/8b" # Base 0A - Yellow
|
||||
color04="8f/a1/b3" # Base 0D - Blue
|
||||
color05="b4/8e/ad" # Base 0E - Magenta
|
||||
color06="96/b5/b4" # Base 0C - Cyan
|
||||
color07="c0/c5/ce" # Base 05 - White
|
||||
color08="65/73/7e" # Base 03 - Bright Black
|
||||
color09=$color01 # Base 08 - Bright Red
|
||||
color10=$color02 # Base 0B - Bright Green
|
||||
color11=$color03 # Base 0A - Bright Yellow
|
||||
color12=$color04 # Base 0D - Bright Blue
|
||||
color13=$color05 # Base 0E - Bright Magenta
|
||||
color14=$color06 # Base 0C - Bright Cyan
|
||||
color15="ef/f1/f5" # Base 07 - Bright White
|
||||
color16="d0/87/70" # Base 09
|
||||
color17="ab/79/67" # Base 0F
|
||||
color18="34/3d/46" # Base 01
|
||||
color19="4f/5b/66" # Base 02
|
||||
color20="a7/ad/ba" # Base 04
|
||||
color21="df/e1/e8" # Base 06
|
||||
color22="24/28/31" # Slightly darker Base 00
|
||||
color_foreground="c0/c5/ce" # Base 05
|
||||
color_background="2b/30/3b" # Base 00
|
||||
|
||||
|
||||
if [ -n "$TMUX" ]; then
|
||||
# Tell tmux to pass the escape sequences through
|
||||
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
|
||||
put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' $@; }
|
||||
put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' $@; }
|
||||
put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' $@; }
|
||||
elif [ "${TERM%%[-.]*}" = "screen" ]; then
|
||||
# GNU screen (screen, screen-256color, screen-256color-bce)
|
||||
put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' $@; }
|
||||
put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' $@; }
|
||||
put_template_custom() { printf '\033P\033]%s%s\007\033\\' $@; }
|
||||
elif [ "${TERM%%-*}" = "linux" ]; then
|
||||
put_template() { [ $1 -lt 16 ] && printf "\e]P%x%s" $1 $(echo $2 | sed 's/\///g'); }
|
||||
put_template_var() { true; }
|
||||
put_template_custom() { true; }
|
||||
else
|
||||
put_template() { printf '\033]4;%d;rgb:%s\033\\' $@; }
|
||||
put_template_var() { printf '\033]%d;rgb:%s\033\\' $@; }
|
||||
put_template_custom() { printf '\033]%s%s\033\\' $@; }
|
||||
fi
|
||||
|
||||
# 16 color space
|
||||
put_template 0 $color00
|
||||
put_template 1 $color01
|
||||
put_template 2 $color02
|
||||
put_template 3 $color03
|
||||
put_template 4 $color04
|
||||
put_template 5 $color05
|
||||
put_template 6 $color06
|
||||
put_template 7 $color07
|
||||
put_template 8 $color08
|
||||
put_template 9 $color09
|
||||
put_template 10 $color10
|
||||
put_template 11 $color11
|
||||
put_template 12 $color12
|
||||
put_template 13 $color13
|
||||
put_template 14 $color14
|
||||
put_template 15 $color15
|
||||
|
||||
# 256 color space
|
||||
put_template 16 $color16
|
||||
put_template 17 $color17
|
||||
put_template 18 $color18
|
||||
put_template 19 $color19
|
||||
put_template 20 $color20
|
||||
put_template 21 $color21
|
||||
put_template 22 $color22
|
||||
|
||||
# foreground / background / cursor color
|
||||
if [ -n "$ITERM_SESSION_ID" ]; then
|
||||
# iTerm2 proprietary escape codes
|
||||
put_template_custom Pg c0c5ce # foreground
|
||||
put_template_custom Ph 2b303b # background
|
||||
put_template_custom Pi c0c5ce # bold color
|
||||
put_template_custom Pj 4f5b66 # selection color
|
||||
put_template_custom Pk c0c5ce # selected text color
|
||||
put_template_custom Pl c0c5ce # cursor
|
||||
put_template_custom Pm 2b303b # cursor text
|
||||
else
|
||||
put_template_var 10 $color_foreground
|
||||
if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then
|
||||
put_template_var 11 $color_background
|
||||
if [ "${TERM%%-*}" = "rxvt" ]; then
|
||||
put_template_var 708 $color_background # internal border (rxvt)
|
||||
fi
|
||||
fi
|
||||
put_template_custom 12 ";7" # cursor (reverse video)
|
||||
fi
|
||||
|
||||
# clean up
|
||||
unset -f put_template
|
||||
unset -f put_template_var
|
||||
unset -f put_template_custom
|
||||
unset color00
|
||||
unset color01
|
||||
unset color02
|
||||
unset color03
|
||||
unset color04
|
||||
unset color05
|
||||
unset color06
|
||||
unset color07
|
||||
unset color08
|
||||
unset color09
|
||||
unset color10
|
||||
unset color11
|
||||
unset color12
|
||||
unset color13
|
||||
unset color14
|
||||
unset color15
|
||||
unset color16
|
||||
unset color17
|
||||
unset color18
|
||||
unset color19
|
||||
unset color20
|
||||
unset color21
|
||||
unset color_foreground
|
||||
unset color_background
|
||||
|
||||
|
||||
42
site-modules/core/files/bin/git-merge-to
Executable file
42
site-modules/core/files/bin/git-merge-to
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Merges a git branch into a another branch.
|
||||
#
|
||||
# Author: Ade Attwood <code@adeattwood.co.uk>
|
||||
# Created: 2018-11-11
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
MERGE_BRANCH="$1";
|
||||
|
||||
main() {
|
||||
local branch=$(git rev-parse --abbrev-ref HEAD);
|
||||
echo "Merging $branch with $MERGE_BRANCH";
|
||||
|
||||
git checkout $MERGE_BRANCH;
|
||||
git pull origin $MERGE_BRANCH
|
||||
git merge --ff-only --log $branch;
|
||||
}
|
||||
|
||||
if [[ ! -z "$1" ]]; then
|
||||
main;
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cat << HELP
|
||||
Git Merge To
|
||||
|
||||
For the reverse of \`git merge\`
|
||||
|
||||
The flow for the script is:
|
||||
|
||||
- Change to the target branch
|
||||
- Pull branch for the latest changes
|
||||
- Merge the previous branch
|
||||
|
||||
Usage: $0 <branch_name>
|
||||
|
||||
HELP
|
||||
|
||||
exit 1;
|
||||
42
site-modules/core/files/bin/git-server-tag
Executable file
42
site-modules/core/files/bin/git-server-tag
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Creates a git tag when publishing code to a server.
|
||||
#
|
||||
# Author: Ade Attwood <code@adeattwood.co.uk>
|
||||
# Created: 2018-11-11
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SERVER="$1";
|
||||
|
||||
main() {
|
||||
local date=`date +%Y-%m-%d-%H-%M`;
|
||||
local tag="$SERVER/$date";
|
||||
|
||||
git tag "$tag";
|
||||
|
||||
echo "Tag $tag has been created";
|
||||
echo "You can push the tag by running";
|
||||
echo " git push origin $tag";
|
||||
}
|
||||
|
||||
if [[ ! -z "$1" ]]; then
|
||||
main;
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cat << HELP
|
||||
Git Server Tag
|
||||
|
||||
When publishing code to a server you can run this command
|
||||
and it will create a git tag with the server name and
|
||||
date time you published the code
|
||||
|
||||
Example Tag: \`stage/2018-11-11-17-17\`
|
||||
|
||||
Usage: $0 <server_name>
|
||||
|
||||
HELP
|
||||
|
||||
exit 1;
|
||||
33
site-modules/core/files/bin/knock
Executable file
33
site-modules/core/files/bin/knock
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Sends a http request to a URL and a port. This is used to knock on port to
|
||||
# open other ports. See: https://wiki.archlinux.org/index.php/Port_knocking
|
||||
#
|
||||
# Using this in your `.ssh/config` as a proxy command can be a nice way to
|
||||
# automatically knock on ports before connecting with ssh.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# ```
|
||||
# ProxyCommand bash -c '/home/ade/.dotfiles/bin/knock %h {port_number}; exec /bin/nc %h %p'
|
||||
# ```
|
||||
#
|
||||
# Author: Ade Attwood <code@adeattwood.co.uk>
|
||||
# Created: 2019-07-11
|
||||
#
|
||||
|
||||
#
|
||||
# Set off the http request
|
||||
#
|
||||
curl --max-time 5 http://$1:$2 > /dev/null 2>&1 &
|
||||
|
||||
#
|
||||
# Wait for a fuw seconds
|
||||
#
|
||||
sleep 2.5
|
||||
|
||||
#
|
||||
# Return a success code to carry on the ssh connection
|
||||
#
|
||||
exit 0;
|
||||
|
||||
12
site-modules/core/files/bin/ubuntu.startup
Executable file
12
site-modules/core/files/bin/ubuntu.startup
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Script that runs on the start up of ubuntu gnome shell
|
||||
#
|
||||
# Author: Ade Attwood <code@adeattwood.co.uk>
|
||||
# Created: 2019-02-16
|
||||
#
|
||||
|
||||
#
|
||||
# Load local Xresources fix to #3
|
||||
#
|
||||
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
|
||||
19
site-modules/core/files/bin/update-sys
Executable file
19
site-modules/core/files/bin/update-sys
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Updates a systems packages and the dotfiles
|
||||
#
|
||||
# Author: Ade Attwood <code@adeattwood.co.uk>
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
# Update apt packages
|
||||
#
|
||||
sudo apt-get update;
|
||||
sudo apt-get upgrade;
|
||||
|
||||
#
|
||||
# Update dotfiles
|
||||
#
|
||||
dotfiles update
|
||||
BIN
site-modules/core/files/fonts/LigaFreeMono.ttf
Normal file
BIN
site-modules/core/files/fonts/LigaFreeMono.ttf
Normal file
Binary file not shown.
12
site-modules/core/files/oh-my-zsh/custom.zsh
Normal file
12
site-modules/core/files/oh-my-zsh/custom.zsh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Set up
|
||||
#
|
||||
SCRIPT_PATH="${0:A:h}"
|
||||
|
||||
#
|
||||
# Source all the custom lib files
|
||||
#
|
||||
for config_file ($ZSH_CUSTOM/custom/*.zsh); do
|
||||
source $config_file
|
||||
done
|
||||
unset config_file
|
||||
38
site-modules/core/files/oh-my-zsh/custom/compress.zsh
Normal file
38
site-modules/core/files/oh-my-zsh/custom/compress.zsh
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
function compress() {
|
||||
local compression_type="gz"
|
||||
|
||||
if (( $# == 0 )); then
|
||||
cat <<-'EOF' >&2
|
||||
Usage: compress [-option] [file ...]
|
||||
|
||||
Options:
|
||||
-t, --type The compression tool you would like use to compress the target
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ "$1" == "-t" ]] || [[ "$1" == "--type" ]]; then
|
||||
compression_type="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
while (( $# > 0 )); do
|
||||
if [[ ! -f "$1" ]] && [[ ! -d "$1" ]]; then
|
||||
echo "compress: '$1' is not a valid file or directory" >&2
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
|
||||
success=0
|
||||
|
||||
if [[ "$compression_type" == 'gz' ]] && [[ -d "$1" ]]; then
|
||||
tar -czvf "$1.tar.gz" $1
|
||||
fi
|
||||
|
||||
if [[ "$compression_type" == 'gz' ]] && [[ -f "$1" ]]; then
|
||||
gzip $1
|
||||
fi
|
||||
|
||||
(( success = $success > 0 ? $success : $? ))
|
||||
shift
|
||||
done
|
||||
}
|
||||
42
site-modules/core/files/oh-my-zsh/custom/docker.zsh
Normal file
42
site-modules/core/files/oh-my-zsh/custom/docker.zsh
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Docker
|
||||
#
|
||||
alias dk="docker"
|
||||
alias dkl="docker logs -f"
|
||||
alias dkps="docker ps --format '{{.ID}} ~ {{.Names}} ~ {{.Status}} ~ {{.Image}}' | column -t -s'~'"
|
||||
alias dkrm="docker rm"
|
||||
|
||||
function dke() {
|
||||
#
|
||||
# Get the container name you want to execute in
|
||||
#
|
||||
local container="$1"
|
||||
#
|
||||
# Shift the params so we can pass the rest to the container
|
||||
#
|
||||
shift
|
||||
#
|
||||
# Run the command in the container
|
||||
#
|
||||
docker exec -it $container /bin/bash -c "$@"
|
||||
}
|
||||
|
||||
function dklogin() {
|
||||
docker exec -it $1 /bin/sh -c "[ -e /bin/bash ] && /bin/bash || /bin/sh"
|
||||
}
|
||||
|
||||
function dktop() {
|
||||
docker stats --format "table {{.Container}}\t{{.Name}}\t{{.CPUPerc}} {{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}"
|
||||
}
|
||||
|
||||
#
|
||||
# Docker Compose
|
||||
#
|
||||
alias dkc="docker-compose"
|
||||
alias dkcdown="docker-compose down"
|
||||
alias dkcup="docker-compose up -d"
|
||||
|
||||
function dkcrestart() {
|
||||
docker-compose stop $1
|
||||
docker-compose up -d $1
|
||||
}
|
||||
22
site-modules/core/files/oh-my-zsh/custom/git.zsh
Normal file
22
site-modules/core/files/oh-my-zsh/custom/git.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
source $ZSH/lib/git.zsh
|
||||
|
||||
alias gcon="git diff --name-only --diff-filter=U"
|
||||
alias gml="git merge --log"
|
||||
alias gl="git --no-pager log --oneline --reverse --max-count=40"
|
||||
|
||||
function git_get_fetch_url() {
|
||||
git remote show origin -n | awk '/Fetch URL:/{print $3}'
|
||||
}
|
||||
|
||||
function gi() {
|
||||
curl -sL https://www.gitignore.io/api/$@;
|
||||
}
|
||||
|
||||
function ggpushmr() {
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Error: Target branch to create your merge request against is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ggpush -o merge_request.create -o merge_request.target="$1" -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch
|
||||
}
|
||||
18
site-modules/core/files/oh-my-zsh/custom/kubectl.zsh
Normal file
18
site-modules/core/files/oh-my-zsh/custom/kubectl.zsh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
if (( $+commands[kubectl] )); then
|
||||
__KUBECTL_COMPLETION_FILE="${ZSH_CACHE_DIR}/kubectl_completion"
|
||||
|
||||
if [[ ! -f $__KUBECTL_COMPLETION_FILE ]]; then
|
||||
kubectl completion zsh >! $__KUBECTL_COMPLETION_FILE
|
||||
fi
|
||||
|
||||
[[ -f $__KUBECTL_COMPLETION_FILE ]] && source $__KUBECTL_COMPLETION_FILE
|
||||
|
||||
unset __KUBECTL_COMPLETION_FILE
|
||||
fi
|
||||
|
||||
# This command is used a LOT both below and in daily life
|
||||
alias k=kubectl
|
||||
|
||||
alias kube-get-url="kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print \$NF}'"
|
||||
alias kube-get-cert="kubectl get secret \`kubectl get secrets | grep default-token | cut -d \" \" -f1\` -o jsonpath=\"{['data']['ca\.crt']}\" | base64 --decode"
|
||||
alias kube-get-token="kubectl get secret \`kubectl get secrets | grep default-token | cut -d \" \" -f1\` -o jsonpath=\"{['data']['token']}\" | base64 --decode"
|
||||
9
site-modules/core/files/oh-my-zsh/custom/make.zsh
Normal file
9
site-modules/core/files/oh-my-zsh/custom/make.zsh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Make alias for working with makefiles
|
||||
#
|
||||
#
|
||||
|
||||
alias m="make"
|
||||
alias mi="make install"
|
||||
alias mb="make build"
|
||||
|
||||
37
site-modules/core/files/oh-my-zsh/custom/mdman.zsh
Normal file
37
site-modules/core/files/oh-my-zsh/custom/mdman.zsh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
#
|
||||
# Displays markdown files in a man format
|
||||
#
|
||||
# Arguments:
|
||||
# 1. The path to the markdown file
|
||||
# Examples:
|
||||
# mdman ~/docs/file.md
|
||||
#
|
||||
function mdman() {
|
||||
local file="$1";
|
||||
|
||||
local tmp="/tmp/mdman";
|
||||
local tmp_file="$tmp/$(basename $file).man";
|
||||
|
||||
if [[ -f "$tmp_file" ]]; then
|
||||
man "$tmp_file";
|
||||
return
|
||||
fi
|
||||
|
||||
mkdir -p "$tmp";
|
||||
|
||||
if [[ ! -f "$file" ]]; then
|
||||
file=`locate "$file.md"`
|
||||
|
||||
if [[ ! -f "$file" ]]; then
|
||||
echo "$file is not found";
|
||||
return 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f "$tmp_file" ]];then
|
||||
pandoc -s -t man "$file" -o "$tmp_file";
|
||||
fi
|
||||
|
||||
man "$tmp_file";
|
||||
}
|
||||
25
site-modules/core/files/oh-my-zsh/custom/shortcuts.zsh
Normal file
25
site-modules/core/files/oh-my-zsh/custom/shortcuts.zsh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Short cuts to map directories to variables
|
||||
#
|
||||
|
||||
dotfiles=~/.dotfiles
|
||||
|
||||
#
|
||||
# Folder for the dev projects
|
||||
#
|
||||
sites=~/sites
|
||||
development=~/development
|
||||
dev=$development
|
||||
|
||||
#
|
||||
# Mail short cuts
|
||||
#
|
||||
mail=~/mail
|
||||
mutt_scripts=~/.mutt/scripts
|
||||
|
||||
#
|
||||
# Zsh hash
|
||||
#
|
||||
hash -d s=~/sites
|
||||
hash -d df=~/.dotfiles
|
||||
hash -d d=~/development
|
||||
4
site-modules/core/files/oh-my-zsh/custom/tmux.zsh
Normal file
4
site-modules/core/files/oh-my-zsh/custom/tmux.zsh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
alias tmux="tmux -2"
|
||||
alias ts='tmux switch-client -t'
|
||||
alias td='tmux detach-client'
|
||||
9
site-modules/core/files/oh-my-zsh/custom/vagrant.zsh
Normal file
9
site-modules/core/files/oh-my-zsh/custom/vagrant.zsh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
alias v="vagrant"
|
||||
alias vba="vagrant box add"
|
||||
alias vbl="vagrant box list"
|
||||
alias vbu="vagrant box update"
|
||||
alias vr="vagrant reload"
|
||||
alias vssh="vagrant ssh"
|
||||
alias vup="vagrant up"
|
||||
alias vh="vagrant halt"
|
||||
5
site-modules/core/files/oh-my-zsh/custom/yii2.zsh
Normal file
5
site-modules/core/files/oh-my-zsh/custom/yii2.zsh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
alias y="php yii"
|
||||
alias ym="php yii migrate/up"
|
||||
alias ymd="php yii migrate/down"
|
||||
alias ycc="php yii cache/flush-all"
|
||||
22
site-modules/core/files/oh-my-zsh/lib/misc.zsh
Normal file
22
site-modules/core/files/oh-my-zsh/lib/misc.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Overrode to he misc lib file to manipulate oh my zsh before the plugins are
|
||||
# loaded. If you need to run code after the plugins you can see
|
||||
# $ZSH_CUSTOM/custom.zsh
|
||||
#
|
||||
|
||||
#
|
||||
# Load in the original misc file
|
||||
#
|
||||
source $ZSH/lib/misc.zsh
|
||||
|
||||
#
|
||||
# Add all of the plugins in the custom plugins dir automatically with out
|
||||
# defining them in the pugins array
|
||||
#
|
||||
for plugin ($ZSH_CUSTOM/plugins/*); do
|
||||
plugin_name="$(basename $plugin)"
|
||||
if [[ ! -n "${plugins[(r)$plugin_name]}" ]]; then
|
||||
plugins+=($plugin_name)
|
||||
fi
|
||||
done
|
||||
unset plugin plugin_name
|
||||
19
site-modules/core/files/oh-my-zsh/plugins/notmuch/README.md
Normal file
19
site-modules/core/files/oh-my-zsh/plugins/notmuch/README.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Notmuch oh my zsh plugin
|
||||
|
||||
| Command | Description |
|
||||
| ---- | ---- |
|
||||
| nm | Alias for notmuch |
|
||||
| nmc | Alias for notmuch count |
|
||||
| nmm | Moves a notmuch search term into a specified folder |
|
||||
| nmnew | Prints out all of the new mail useing the tag of "unread" |
|
||||
| nms | Alias for notmuch search |
|
||||
| nmt | Alias for notmuch tag |
|
||||
|
||||
## Converting the docs
|
||||
|
||||
To convert the docs you need `pandoc` installed and out can use this command
|
||||
|
||||
~~~ zsh
|
||||
find ./docs -name "*.md" -exec sh -c 'pandoc -s -t man "${0}" -o "./man/$(basename ${0%.md})"' {} \;
|
||||
~~~
|
||||
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
title: NOTMUCH_OH_MY_ZSH
|
||||
|
||||
section: 1
|
||||
|
||||
header: notmuch-move
|
||||
|
||||
footer: Versoin 1.0.0
|
||||
|
||||
date: 2019-01-01
|
||||
|
||||
author:
|
||||
- Ade Attwood <code@adeattwood.co.uk>
|
||||
|
||||
lang: en-GB
|
||||
---
|
||||
|
||||
# NAME
|
||||
|
||||
notmuch-move — Move a notmuch search into a new directory
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
notmuch-move \<dir\> \<search-term\>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
Moves all of the emails found by a search term into a new directory
|
||||
|
||||
## Aguments
|
||||
|
||||
1, The path to move the emails to
|
||||
|
||||
.., The notmuch search term
|
||||
|
||||
## Options
|
||||
|
||||
-h, --help
|
||||
|
||||
: Loads this man page
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
notmuch-move ~/mail/local/INBOX.Trash from:junk@email.com and tag:to-delete
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
**notmuch-search(1)**, **notmuch-search-terms(7)**
|
||||
38
site-modules/core/files/oh-my-zsh/plugins/notmuch/notmuch.plugin.zsh
Executable file
38
site-modules/core/files/oh-my-zsh/plugins/notmuch/notmuch.plugin.zsh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# This is the main plugin file for the plugin
|
||||
#
|
||||
# AUTHOR: Ade Attwood <code@adeattwood.co.uk>
|
||||
#
|
||||
|
||||
#
|
||||
# Move all of the emails matching a search term into a folder
|
||||
#
|
||||
function notmuch-move() {
|
||||
|
||||
if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
|
||||
mdman "$dotfiles/oh-my-zsh/custom/plugins/notmuch/docs/notmuch-move.md";
|
||||
return 0;
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "No search";
|
||||
return 1;
|
||||
fi
|
||||
|
||||
local path="$1"; shift;
|
||||
local search="$@";
|
||||
|
||||
/usr/bin/notmuch search --output=files "$search" \
|
||||
| /usr/bin/xargs -I{} /bin/mv "{}" "$path";
|
||||
}
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
alias nm="notmuch"
|
||||
alias nmc="notmuch count"
|
||||
alias nmm="notmuch-move"
|
||||
alias nmnew="notmuch search tag:untrad"
|
||||
alias nms="notmuch search"
|
||||
alias nmt="notmuch tag"
|
||||
|
||||
10
site-modules/core/files/scripts/npm-install-package
Executable file
10
site-modules/core/files/scripts/npm-install-package
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Set NVM_DIR if it isn't already defined
|
||||
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
# Load nvm if it exists
|
||||
[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
|
||||
|
||||
# Install the package
|
||||
npm install -g "$1"
|
||||
153
site-modules/core/files/tmux.conf
Normal file
153
site-modules/core/files/tmux.conf
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
# split windows like vim
|
||||
# vim's definition of a horizontal/vertical split is reversed from tmux's
|
||||
bind s split-window -v -c "#{pane_current_path}"
|
||||
bind v split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Smart pane switching with awareness of vim splits
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
bind-key -T copy-mode-vi C-h select-pane -L
|
||||
bind-key -T copy-mode-vi C-j select-pane -D
|
||||
bind-key -T copy-mode-vi C-k select-pane -U
|
||||
bind-key -T copy-mode-vi C-l select-pane -R
|
||||
|
||||
#
|
||||
# Set color term
|
||||
#
|
||||
set-option -sg escape-time 10
|
||||
set-option -g default-terminal "xterm-256color"
|
||||
|
||||
#
|
||||
# Set long history
|
||||
#
|
||||
set-option -g history-limit 5000
|
||||
|
||||
# resize panes like vim
|
||||
# feel free to change the "1" to however many lines you want to resize by, only
|
||||
# one at a time can be slow
|
||||
bind < resize-pane -L 1
|
||||
bind > resize-pane -R 1
|
||||
bind - resize-pane -D 1
|
||||
bind + resize-pane -U 1
|
||||
|
||||
# bind : to command-prompt like vim
|
||||
# this is the default in tmux already
|
||||
bind : command-prompt
|
||||
|
||||
# vi-style controls for copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# set windows so they dont resize to the smallest
|
||||
setw -g aggressive-resize on
|
||||
|
||||
# use mouse on
|
||||
set -g mouse on
|
||||
set-option -g mouse on
|
||||
|
||||
set -g @open-S 'https://www.duckduckgo.com/'
|
||||
|
||||
# Init plugins
|
||||
run-shell ~/.tmux/plugins/tmux-copycat/copycat.tmux
|
||||
run-shell ~/.tmux/plugins/tmux-open/open.tmux
|
||||
run-shell ~/.tmux/plugins/tmux-yank/yank.tmux
|
||||
|
||||
# Automatically renumber window numbers on closing a pane (tmux >= 1.7).
|
||||
set -g renumber-windows on
|
||||
|
||||
# Stay in copy mode on drag end.
|
||||
# (Would use `bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X
|
||||
# stop-selection` but it is a bit glitchy.)
|
||||
unbind-key -T copy-mode-vi MouseDragEnd1Pane
|
||||
|
||||
# Search back to last prompt.
|
||||
bind-key b copy-mode\; send-keys -X start-of-line\; send-keys -X search-backward "⇒"\; send-keys -X next-word
|
||||
|
||||
# Set `v` key to start selection like vim
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
|
||||
# Start window and pane numbering at 1, (0 is too hard to reach).
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# Needed as on tmux 1.9 and up (defaults to off).
|
||||
# Added in tmux commit c7a121cfc0137c907b7bfb.
|
||||
# Also need by vim plugin tmux-focus-events.vim
|
||||
set -g focus-events on
|
||||
|
||||
# Powerline Double Blue - Tmux Theme
|
||||
# Created by Jim Myhrberg <contact@jimeh.me>.
|
||||
#
|
||||
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
|
||||
#
|
||||
# Requires terminal to be using a powerline compatible font, find one here:
|
||||
# https://github.com/Lokaltog/powerline-fonts
|
||||
#
|
||||
# Original code form https://github.com/jimeh/tmux-themepack/blob/1.0.0/powerline/double/blue.tmuxtheme
|
||||
# This has now been modufied to set color styles for tmux >= 2.9 ish
|
||||
|
||||
|
||||
# Status update interval
|
||||
set -g status-interval 1
|
||||
|
||||
# Basic status bar colors
|
||||
set -g status-fg colour238
|
||||
set -g status-bg colour233
|
||||
|
||||
# Left side of status bar
|
||||
set -g status-left-style bg=colour233,fg=colour243
|
||||
set -g status-left-length 40
|
||||
set -g status-left "#[fg=colour232,bg=colour24,bold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"
|
||||
|
||||
# Right side of status bar
|
||||
set -g status-right-style bg=colour233,fg=colour243
|
||||
set -g status-right-length 150
|
||||
set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour24,bg=colour240]#[fg=colour232,bg=colour24,bold] #H "
|
||||
|
||||
# Window status
|
||||
set -g window-status-format " #I:#W#F "
|
||||
set -g window-status-current-format "#[fg=colour233,bg=black]#[fg=colour33,nobold] #I:#W#F #[fg=colour233,bg=black,nobold]"
|
||||
|
||||
# Current window status
|
||||
set -g window-status-current-style bg=colour24,fg=colour233
|
||||
|
||||
# Window with activity status
|
||||
set -g window-status-activity-style fg=colour233,bg=colour245 # fg and bg are flipped here due to a bug in tmux
|
||||
|
||||
# Highlight active window.
|
||||
#set -w -g window-status-current-bg red
|
||||
set -g window-style 'bg=colour22'
|
||||
set -g window-active-style 'bg=colour0'
|
||||
|
||||
# Window separator
|
||||
set -g window-status-separator ""
|
||||
|
||||
# Window status alignment
|
||||
set -g status-justify centre
|
||||
|
||||
# Pane border
|
||||
set -g pane-border-style bg=default,fg=colour238
|
||||
|
||||
# Active pane border
|
||||
set -g pane-active-border-style bg=default,fg=colour24
|
||||
|
||||
# Pane number indicator
|
||||
set -g display-panes-colour colour233
|
||||
set -g display-panes-active-colour colour245
|
||||
|
||||
# Clock mode
|
||||
set -g clock-mode-colour colour24
|
||||
set -g clock-mode-style 24
|
||||
|
||||
# Message
|
||||
set -g message-style bg=colour24,fg=black
|
||||
|
||||
# Command message
|
||||
set -g message-command-style bg=colour233,fg=black
|
||||
|
||||
# Mode
|
||||
set -g mode-style bg=colour24,fg=colour231
|
||||
24
site-modules/core/files/vim/UltiSnips/all.snippets
Normal file
24
site-modules/core/files/vim/UltiSnips/all.snippets
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
snippet date "YYYY-MM-DD" w
|
||||
`!v strftime("%Y-%m-%d")`
|
||||
endsnippet
|
||||
|
||||
snippet ddate "Month DD, YYYY" w
|
||||
`!v strftime("%b %d, %Y")`
|
||||
endsnippet
|
||||
|
||||
snippet diso "ISO format datetime" w
|
||||
`!v strftime("%Y-%m-%d %H:%M:%S%z")`
|
||||
endsnippet
|
||||
|
||||
snippet time "hh:mm" w
|
||||
`!v strftime("%H:%M")`
|
||||
endsnippet
|
||||
|
||||
snippet datetime "YYYY-MM-DD hh:mm" w
|
||||
`!v strftime("%Y-%m-%d %H:%M")`
|
||||
endsnippet
|
||||
|
||||
snippet uuid "Random UUID" w
|
||||
`!p if not snip.c: import uuid; snip.rv = uuid.uuid4()`
|
||||
endsnippet
|
||||
|
||||
45
site-modules/core/files/vim/UltiSnips/gitcommit.snippets
Normal file
45
site-modules/core/files/vim/UltiSnips/gitcommit.snippets
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
snippet fix "Bug fix commit message" b
|
||||
fix(${1:category}): ${2:title}
|
||||
|
||||
${3:description}
|
||||
|
||||
fixes issue ${4:issue number}
|
||||
endsnippet
|
||||
|
||||
snippet feat "Feature commit message" b
|
||||
feat(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet chore "Chore commit message" b
|
||||
chore(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet ci "Continuous intergration commit message" b
|
||||
ci(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet docs "Documentation commit message" b
|
||||
docs(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet test "Test commit message" b
|
||||
test(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet style "Code styling commit message" b
|
||||
style(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet perf "Performance commit message" b
|
||||
perf(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet refactor "Refactor commit message" b
|
||||
refactor(${1:category}): ${2:title}
|
||||
endsnippet
|
||||
|
||||
snippet bc "Breaking change" b
|
||||
BREAKING CHANGE: ${0:Description}
|
||||
endsnippet
|
||||
|
||||
|
||||
77
site-modules/core/files/vim/UltiSnips/go.snippets
Normal file
77
site-modules/core/files/vim/UltiSnips/go.snippets
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
snippet /^import/ "Import declaration" r
|
||||
import (
|
||||
"${1:package}"
|
||||
)
|
||||
endsnippet
|
||||
|
||||
snippet struct "Struct declaration" b
|
||||
type ${1:Struct} struct {
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet interface "Interface declaration" b
|
||||
type ${1:Interface} interface {
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet if "If statement" b
|
||||
if ${1:condition}${1/(.+)/ /}{
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet switch "Switch statement" b
|
||||
switch ${1:expression}${1/(.+)/ /}{
|
||||
case$0
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet /^main/ "Main function" r
|
||||
func main() {
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet /^meth/ "Method" r
|
||||
func (${1:receiver} ${2:type}) ${3:name}(${4:params})${5/(.+)/ /}${5:type} {
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet func "Function" b
|
||||
func ${1:name}(${2:params})${3/(.+)/ /}${3:type} {
|
||||
${0:${VISUAL}}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet map "Map type" b
|
||||
map[${1:keytype}]${2:valtype}
|
||||
endsnippet
|
||||
|
||||
snippet : "Variable declaration :=" b
|
||||
${1:name} := ${0:value}
|
||||
endsnippet
|
||||
|
||||
snippet var "Variable declaration" b
|
||||
var ${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value}}
|
||||
endsnippet
|
||||
|
||||
snippet vars "Variables declaration" b
|
||||
var (
|
||||
${1:name}${2/(.+)/ /}${2:type}${3: = ${0:value} }
|
||||
)
|
||||
endsnippet
|
||||
|
||||
snippet json "JSON field"
|
||||
\`json:"${1:displayName}"\`
|
||||
endsnippet
|
||||
|
||||
snippet err "Basic error handling" b
|
||||
if err != nil {
|
||||
log.${1:Fatal}(err)
|
||||
}
|
||||
endsnippet
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
snippet php "php tag" i
|
||||
<?php $1 ?>
|
||||
<?php $0 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpe "php echo tag" i
|
||||
<?= $1 ?>
|
||||
<?= $0 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpif "php if statment" b
|
||||
<?php if($1): ?>
|
||||
$2
|
||||
$0
|
||||
<?php endif; ?>
|
||||
endsnippet
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ snippet phpife "php if else statment" b
|
|||
<? if ($1): ?>
|
||||
$2
|
||||
<? else: ?>
|
||||
$3
|
||||
$0
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
|
|
@ -26,18 +26,22 @@ snippet phpifeif "php if else if statment" b
|
|||
<? elseif ($3): ?>
|
||||
$4
|
||||
<? else: ?>
|
||||
$5
|
||||
$0
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpfe "php foreach" b
|
||||
<?php foreach(${1:$array} as ${2:$key}=>${3:$value}): ?>
|
||||
$4
|
||||
$0
|
||||
<?php endforeach; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpf "php for loop" b
|
||||
<?php for ($i = ${1:1}; $i <= ${2:count}; $i++): ?>
|
||||
$3
|
||||
$0
|
||||
<?php endfor; ?>
|
||||
endsnippet
|
||||
|
||||
snippet prdd "vardump in php tags" b
|
||||
<?php \revo\Revo::dieVar( ${0:var} ); ?>
|
||||
endsnippet
|
||||
93
site-modules/core/files/vim/UltiSnips/javascript.snippets
Normal file
93
site-modules/core/files/vim/UltiSnips/javascript.snippets
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
snippet #! "shebang"
|
||||
#!/usr/bin/env node
|
||||
endsnippet
|
||||
|
||||
snippet vreq "assign a CommonJS-style module to a var"
|
||||
const ${0:${1/(.+\/)*(\w+)(-|\b|$)(\..+$)?/\u$2/g}} = require('$1');
|
||||
endsnippet
|
||||
|
||||
snippet import "ES6 import" b
|
||||
import {$0} from '$1';
|
||||
endsnippet
|
||||
|
||||
snippet ex "module.exports"
|
||||
module.exports = $0;
|
||||
endsnippet
|
||||
|
||||
snippet default "export default" b
|
||||
export default $0
|
||||
endsnippet
|
||||
|
||||
snippet cl "Console LOG" b
|
||||
console.log($0);
|
||||
endsnippet
|
||||
|
||||
snippet cw "Console Warn" b
|
||||
console.warn($0);
|
||||
endsnippet
|
||||
|
||||
snippet ce "Console Error" b
|
||||
console.error($0);
|
||||
endsnippet
|
||||
|
||||
snippet rfc "React functional component" b
|
||||
export const ${1:Name} = (${2:props})=> {
|
||||
return (
|
||||
${0:<div>Component</div>}
|
||||
);
|
||||
};
|
||||
|
||||
$1.propTypes = {};
|
||||
endsnippet
|
||||
|
||||
snippet rc "React component" b
|
||||
export class ${1:Name} extends React.Component {
|
||||
static propTypes = {};
|
||||
|
||||
state = {};
|
||||
|
||||
render() {
|
||||
return (
|
||||
${0:<div>Component</div>}
|
||||
);
|
||||
}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet raect "Adds react import statements" b
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
endsnippet
|
||||
|
||||
snippet useState "React.useState" w
|
||||
const [$1, set${1/\w+\s*/\u$0/g}] = React.useState(${3:''});${0}
|
||||
endsnippet
|
||||
|
||||
snippet useEffect "useEffect" w
|
||||
React.useEffect(() => {
|
||||
$0
|
||||
});
|
||||
endsnippet
|
||||
|
||||
snippet useContext "useContext" w
|
||||
const $1 = React.useContext($2);${0}
|
||||
endsnippet
|
||||
|
||||
snippet useCallback "useCallback" w
|
||||
React.useCallback(
|
||||
() => {
|
||||
$0
|
||||
},
|
||||
[$1],
|
||||
);
|
||||
endsnippet
|
||||
|
||||
snippet useMemo "useMemo" w
|
||||
const $1 = React.useMemo(() => {
|
||||
${0}
|
||||
}, [$2]);
|
||||
endsnippet
|
||||
|
||||
snippet useRef "useRef" w
|
||||
const $1 = React.useRef($2);${0}
|
||||
endsnippet
|
||||
42
site-modules/core/files/vim/UltiSnips/markdown.snippets
Normal file
42
site-modules/core/files/vim/UltiSnips/markdown.snippets
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
snippet link "Link to something"
|
||||
[${1:${VISUAL:Text}}](${3:http://${2:www.url.com}})$0
|
||||
endsnippet
|
||||
|
||||
snippet img "Image"
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet icode "Inline Code" i
|
||||
\`$1\`$0
|
||||
endsnippet
|
||||
|
||||
snippet code "Codeblock" b
|
||||
\`\`\`${1:lang}
|
||||
$2
|
||||
\`\`\`
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet table "A base table layout" b
|
||||
|${0} | | | | |
|
||||
|---|---|---|---|---|
|
||||
| | | | | |
|
||||
endsnippet
|
||||
|
||||
snippet frontmatter "A basic frontmatter block" b
|
||||
---
|
||||
title: ${1:Title}
|
||||
comments: false
|
||||
date: ${2:date}
|
||||
tags:
|
||||
- ${3:tags}
|
||||
categories:
|
||||
- ${4:categories}
|
||||
---
|
||||
|
||||
${0}
|
||||
endsnippet
|
||||
|
||||
snippet more "A more comment tag for blogs" b
|
||||
<!-- more -->
|
||||
endsnippet
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* ${1:{{name}}}
|
||||
*
|
||||
* @var ${2:{{type}}{{^type}}mixed{{/type}}}
|
||||
*/
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* ${1:{{name}}}
|
||||
*
|
||||
* @category Project
|
||||
* @package \{\{package\}\}
|
||||
* @author Ade Attwood <ade@practically.io>
|
||||
* @copyright `!v strftime('%Y')` Practically.io{{#interfaces}}
|
||||
* @see {{name}}{{/interfaces}}{{#parent}}
|
||||
* @see {{name}}{{/parent}}{{#abstract}}
|
||||
* @abstract {{/abstract}}
|
||||
*/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/**
|
||||
* ${1:{{name}}}
|
||||
*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* ${1:{{name}}}{{?func: vmustache#InitCounter("params", 1)}}
|
||||
*{{#parameters}}
|
||||
* @param ${{{?func: vmustache#IncrementCounter("params")}}:{{type}}{{^type}}mixed{{/type}}} ${{name}}${{{?func: vmustache#IncrementCounter("params")}}}{{/parameters}}
|
||||
*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Interface: ${1:{{name}}}
|
||||
*{{#parents}}
|
||||
* @see {{name}}{{/parents}}
|
||||
*/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/**
|
||||
* Trait: ${1:{{name}}}
|
||||
*/
|
||||
|
|
@ -1,101 +1,112 @@
|
|||
snippet - "" i
|
||||
->$1
|
||||
->$0
|
||||
endsnippet
|
||||
|
||||
snippet = "" i
|
||||
=>
|
||||
=>$0
|
||||
endsnippet
|
||||
|
||||
snippet this "Description" b
|
||||
$this->$1
|
||||
snippet this "Description" i
|
||||
$this->$0
|
||||
endsnippet
|
||||
|
||||
snippet pr "Dumb debug helper in HTML"
|
||||
echo '<pre>' . var_export($1, 1) . '</pre>';$0
|
||||
snippet dd "Dumb debug helper in HTML"
|
||||
echo '<pre>' . var_dump($1, 1) . '</pre>';$0
|
||||
endsnippet
|
||||
|
||||
snippet dump "Symfony Dump" i
|
||||
dump(${1:var});
|
||||
endsnippet
|
||||
|
||||
snippet dumpd "Symfony Dump Die" i
|
||||
dump(${1:var});
|
||||
die;
|
||||
endsnippet
|
||||
|
||||
snippet rdd "Revo die var" i
|
||||
\revo\Revo::dieVar(${1:var});
|
||||
endsnippet
|
||||
|
||||
snippet ai "Array item" i
|
||||
'${1:key}' => ${0:value}
|
||||
endsnippet
|
||||
|
||||
snippet try "Try and catch block" b
|
||||
try {
|
||||
$0
|
||||
} catch (\Exception $e) {}
|
||||
endsnippet
|
||||
|
||||
snippet pub "Public function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
public function ${1:name}(${2:$param})
|
||||
public function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pro "Protected function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
protected function ${1:name}(${2:$param})
|
||||
protected function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pri "Private function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
private function ${1:name}(${2:$param})
|
||||
private function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pubs "Public static function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
public static function ${1:name}(${2:$param})
|
||||
public static function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pros "Protected static function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
protected static function ${1:name}(${2:$param})
|
||||
protected static function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet pris "Private static function" b
|
||||
/**
|
||||
* ${3:undocumented function}
|
||||
*
|
||||
* @return ${4:void}
|
||||
* @return $4
|
||||
*/
|
||||
private static function ${1:name}(${2:$param})
|
||||
private static function ${1:name}(${2:$param})${3:: ${4:void}}
|
||||
{
|
||||
${VISUAL}${5:return null;}
|
||||
|
||||
${VISUAL}$0
|
||||
}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet new "New class instance" b
|
||||
|
|
@ -115,6 +126,8 @@ endsnippet
|
|||
snippet class "Class declaration template" b
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace ${1:`!p
|
||||
relpath = os.path.relpath(path)
|
||||
m = re.search(r'[A-Z].+(?=/)', relpath)
|
||||
|
|
@ -123,11 +136,11 @@ if m:
|
|||
`};
|
||||
|
||||
/**
|
||||
* Class ${1:`!p snip.rv=snip.basename`}
|
||||
* @author ${2:`!v g:snips_author`}
|
||||
*/
|
||||
class $1
|
||||
class ${3:`!p snip.rv=snip.basename`}${4: extends ${5}}
|
||||
{
|
||||
${0}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
snippet ftest "Functional test" b
|
||||
public function ${1:name}(FunctionalTester $I): void
|
||||
{
|
||||
$I->wantToTest('${2:dis}');
|
||||
${3://test}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet utest "Unit test" b
|
||||
public function ${1:name}(UnitTester $I): void
|
||||
{
|
||||
$I->wantToTest('${2:dis}');
|
||||
${3://test}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet atest "Acceptance test" b
|
||||
public function ${1:name}(AcceptanceTester $I): void
|
||||
{
|
||||
$I->wantToTest('${2:dis}');
|
||||
${3://test}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet _b+a "Before and After class" b
|
||||
public function _before(${1:inject})
|
||||
{
|
||||
}
|
||||
|
||||
public function _after($1)
|
||||
{
|
||||
}
|
||||
endsnippet
|
||||
|
||||
65
site-modules/core/files/vim/UltiSnips/php_html.snippets
Normal file
65
site-modules/core/files/vim/UltiSnips/php_html.snippets
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
snippet php "php tag" i
|
||||
<?php $0 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpe "php echo tag" i
|
||||
<?= $0 ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpif "php if statment" b
|
||||
<?php if($1): ?>
|
||||
$0
|
||||
<?php endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpife "php if else statment" b
|
||||
<? if ($1): ?>
|
||||
$2
|
||||
<? else: ?>
|
||||
$0
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpifeif "php if else if statment" b
|
||||
<? if ($1): ?>
|
||||
$2
|
||||
<? elseif ($3): ?>
|
||||
$4
|
||||
<? else: ?>
|
||||
$0
|
||||
<? endif; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpfe "php foreach" b
|
||||
<?php foreach(${1:$array} as ${2:$key}=>${3:$value}): ?>
|
||||
$0
|
||||
<?php endforeach; ?>
|
||||
endsnippet
|
||||
|
||||
snippet phpf "php for loop" b
|
||||
<?php for ($i = ${1:1}; $i <= ${2:count}; $i++): ?>
|
||||
$0
|
||||
<?php endfor; ?>
|
||||
endsnippet
|
||||
|
||||
snippet var-doc "Code for createing a vardoc" b
|
||||
echo '<pre>';
|
||||
echo '/**'.PHP_EOL;
|
||||
echo ' *'.PHP_EOL;
|
||||
$_type = gettype($this) == 'object' ? get_class($this) : gettype($this);
|
||||
echo " * @var $_type \\$this\n";
|
||||
foreach(get_defined_vars() as $name => $var) {
|
||||
if (substr($name, 0, strlen('_')) !== '_' && $name !== 'this') {
|
||||
if (is_array($var) && isset($var[0]) && gettype($var[0]) == 'object') {
|
||||
$type = get_class($var[0]);
|
||||
echo " * @var {$type}[] \$$name\n";
|
||||
continue;
|
||||
}
|
||||
$type = gettype($var) == 'object' ? get_class($var) : gettype($var);
|
||||
echo " * @var $type \$$name\n";
|
||||
}
|
||||
}
|
||||
echo ' */'.PHP_EOL;
|
||||
echo "</pre>";
|
||||
die;
|
||||
endsnippet
|
||||
|
|
@ -2,7 +2,7 @@ snippet yiifk "migration foreign key" b
|
|||
/*
|
||||
* FOREIGN KEY : ${1:Table}.${2:Field}
|
||||
* REFERENCES : ${3:Reference Table}.${4:Reference Field}
|
||||
*/
|
||||
*/
|
||||
$this->addForeignKey(
|
||||
'fk-$1-$2',
|
||||
'$1',
|
||||
|
|
@ -12,3 +12,7 @@ $this->addForeignKey(
|
|||
'CASCADE'
|
||||
);
|
||||
endsnippet
|
||||
|
||||
snippet yapp "Yii App" i
|
||||
Yii::$app->${1:Command}
|
||||
endsnippet
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue