Skip to content

Instantly share code, notes, and snippets.

@hpstuff
Last active June 13, 2023 14:06
Show Gist options
  • Save hpstuff/9941180 to your computer and use it in GitHub Desktop.
Save hpstuff/9941180 to your computer and use it in GitHub Desktop.
# 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 [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
setfont "Droid Sans Mono"
# Add android sdk
PATH=$PATH:~/Android/sdk/platform-tools:~/Android/sdk/tools:~/Android/ndk
# my alias
alias work="cd /media/data/Projects"
alias dw="cd ~/Downloads"
alias data="cd /media/data/"
alias ..="cd .."
alias ...="cd ../.."
alias gs="grunt server"
alias pgs="phonegap serve"
alias :q="exit"
alias serve="python -m SimpleHTTPServer 4000"
alias chrome-unsecure="google-chrome --disable-web-security"
source ~/.local/bin/bashmarks.sh
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH=$HOME/.npm/bin:$PATH
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
set nocompatible " be iMproved, required
set shiftwidth=4
set softtabstop=4
set expandtab
set number
set cindent
set smartindent
set ignorecase
set smartcase
set autoindent
filetype on
filetype indent on
filetype plugin on
filetype plugin indent on
syntax on
au BufNewFile,BufRead *.hbs set filetype=mustache
" let g:ctrlp_root_markers = ['index.html']
" let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
let g:ctrlp_custom_ignore = '\v[\/](node_modules|target|dist)|(\.(ico|git|svn))$'
let g:mustache_abbreviations = 1
let g:solarized_termcolors=256
"set t_Co=16
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'tomasr/molokai'
Plugin 'pangloss/vim-javascript'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'sickill/vim-monokai'
Plugin 'kien/ctrlp.vim'
Plugin 'Townk/vim-autoclose.git'
Plugin 'garbas/vim-snipmate'
Plugin 'rk1/snipmate-snippets'
Plugin 'ervandew/supertab'
Plugin 'jeffkreeftmeijer/vim-numbertoggle'
Plugin 'goldfeld/vim-seek'
Plugin 'tpope/vim-surround'
Plugin 'maksimr/vim-jsbeautify'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'othree/html5-syntax.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'altercation/vim-colors-solarized'
set clipboard+=unnamed
set clipboard=unnamedplus
set foldmethod=indent
nnoremap <Space> za
"CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<c-t>'],
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
\ }
map <leader>ff :call JsBeautify()<cr>
set directory^=$HOME/.swapsvim/
:let g:html_indent_inctags = "li,ul"
let g:SuperTabDefaultCompletionType = "context"
"use comma for a leader key
let mapleader = ","
nmap <leader>vr :tabedit $MYVIMRC<CR>
map <silent> <leader>vrr :source $MYVIMRC<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
map <silent> <leader>aa mmgg=G`m^zz
imap <silent> <leader>aa mmgg=G`m^zr``
"set background=dark
"let g:solarized_termcolors=256
"colorscheme solarized
"colorscheme monokai
"set background=light
"colorscheme solarized
"let g:solarized_contrast="medium"
"let g:solarized_visibility="medium"
"let g:solarized_bold = 0
"call togglebg#map("<F5>")
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Solarized theme for pantheon-terminal
see http://ethanschoonover.com/solarized
"""
import posixpath
import sys
from gi.repository import Gio
BASE03 = '#002B36'
BASE02 = '#073642'
BASE01 = '#586E75'
BASE00 = '#657B83'
BASE0 = '#839496'
BASE1 = '#93A1A1'
BASE2 = '#EEE8D5'
BASE3 = '#FDF6E3'
YELLOW = '#B58900'
ORANGE = '#CB4B16'
RED = '#DC322F'
MAGENTA = '#D33682'
VIOLET = '#6C71C4'
BLUE = '#268BD2'
CYAN = '#2AA198'
GREEN = '#859900'
# 16 colors palette
PALETTE = [BASE02, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, BASE2,
BASE03, ORANGE, BASE01, BASE00, BASE0, VIOLET, BASE1, BASE3]
SCHEMES = {'dark': {'background_color' : BASE03,
'foreground_color' : BASE0,
'bold_color' : BASE1},
'light': {'background_color': BASE3,
'foreground_color': BASE00,
'bold_color' : BASE01}}
def _solarize(scheme):
s = Gio.Settings.new("org.pantheon.terminal.settings")
s.set_string("palette", ':'.join(PALETTE))
s.set_string("foreground", SCHEMES[scheme]['foreground_color'])
s.set_string("background", SCHEMES[scheme]['background_color'])
s.set_string("cursor-color", SCHEMES[scheme]['foreground_color'])
s.sync()
print('applyed {0} scheme'.format(scheme))
def _default():
s = Gio.Settings.new("org.pantheon.terminal.settings")
s.reset("palette")
s.reset("foreground")
s.reset("background")
s.sync()
print('applied defaults')
def main():
if len(sys.argv) > 1 and sys.argv[1] in ('dark', 'light'):
_solarize(scheme=sys.argv[1])
else:
_default()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment