2.25.2014

Create Dashboard App Using Dashing Framework

This dashboard framework is fantastic -> Dashing.

Here's how to create a dashboard very easily...

$ gem install dashing
$ dashing new sweet_dashboard_project
$ cd sweet_dashboard_projec
$ bundle install
$ dashing start
Let's create our own dashboard
$ dashing generate dashboard monweb
       exist  dashboards
      create  dashboards/monweb.erb
Create our monitor widget
$ dashing generate widget monitor
       exist  widgets
      create  widgets/monitor/monitor.coffee
      create  widgets/monitor/monitor.html
      create  widgets/monitor/monitor.scss

2.14.2014

My .vimrc

This is the .vimrc I'm using now. I got from here. Stick this on your home directory.
set nocompatible "This fixes the problem where arrow keys do not function properly on some systems.
syntax on  "Enables syntax highlighting for programming languages
"set mouse=a  "Allows you to click around the text editor with your mouse to move the cursor
set showmatch "Highlights matching brackets in programming languages
set autoindent  "If you're indented, new lines will also be indented
set cindent  "Automatically indents lines after opening a bracket in programming languages
set smartindent
set backspace=2  "This makes the backspace key function like it does in other programs.
set tabstop=8  "How much space Vim gives to a tab
set number  "Enables line numbering
set smarttab  "Improves tabbing
set expandtab  "Expand tabs into spaces"
set shiftwidth=4  "Assists code formatting
colorscheme delek  "Changes the color scheme. Change this to your liking. Lookin /usr/share/vim/vim61/colors/ for options.
"setlocal spell  "Enables spell checking (CURRENTLY DISABLED because it's kinda annoying). Make sure to uncomment the next line if you use this.
"set spellfile=~/.vimwords.add  "The location of the spellcheck dictionary. Uncomment this line if you uncomment the previous line.
"set foldmethod=manual  "Lets you hide sections of code
"--- The following commands make the navigation keys work like standard editors
imap <silent> <Down> <C-o>gj
imap <silent> <Up> <C-o>gk
nmap <silent> <Down> gj
nmap <silent> <Up> gk
"--- Ends navigation commands
"--- The following adds a sweet menu, press F4 to use it.
source $VIMRUNTIME/menu.vim
set wildmenu
set cpo-=<
set wcm=<C-Z>
map <F4> :emenu <C-Z>
"--- End sweet menu
"show current filename
set modeline
set ls=2
" Searches in bold yellow
hi Search ctermfg=Yellow ctermbg=NONE cterm=bold
" make tab in v mode indent code
vmap <tab> >gv
vmap <s-tab> <gv
" make tab in normal mode indent code
nmap <tab> I<tab><esc>
nmap <s-tab> ^i<bs><esc>
" paste mode - this will avoid unexpected effects when you
" cut or copy some text from one window and paste it in Vim.
set pastetoggle=<F11>
" comment/uncomment blocks of code (in vmode)
vmap _c :s/^/#/gi<Enter>
vmap _C :s/^#//gi<Enter>
" Tidy selected lines (or entire file) with _t:
nnoremap <silent> _t :%!perltidy -q<Enter>
vnoremap <silent> _t :!perltidy -q<Enter>
" Deparse obfuscated code
nnoremap <silent> _d :.!perl -MO=Deparse 2>/dev/null<cr>
vnoremap <silent> _d :!perl -MO=Deparse 2>/dev/null<cr>