Skip to content

Instantly share code, notes, and snippets.

View mrmrs's full-sized avatar

Adam Morse mrmrs

View GitHub Profile
" Smarter defaults
set nocompatible " Uses vim vs vi settings must be set first
syntax on " Turn on syntax highlighting for recognized filetypes
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set wildmenu " List outoptions for autocompleting commmands
set number " Adds line numbers
set visualbell " Never hear beep again === happy
set nocompatible
set title
set number
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set laststatus=2
set encoding=utf-8
execute pathogen#infect()
syntax on
@mrmrs
mrmrs / random
Created August 2, 2013 04:34
Random useful things
# Test to see if url is serving up gzipped content
curl --head --compressed URL
-------- HTACCESS STUFF ------
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
csslint --ignore=box-model,universal-selector,underscore-property-hack,star-property-hack
@mrmrs
mrmrs / vimrc-front-end
Created August 6, 2013 19:48
VIMRC for vim beginners that are Front End Developer types.
set nocompatible
set title
set number " Show line numbers
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set laststatus=2 " Always show file status line
set encoding=utf-8
setlocal tabstop=4
setlocal shiftwidth=4
@mrmrs
mrmrs / .gitignore_global
Created August 20, 2013 18:08
Files I want github to ignore.
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mrmrs
mrmrs / count-all-elements.js
Created August 23, 2013 00:24
List all elements on a page. Using this a lot for css performance testing sites I don't have source for locally.
document.getElementsByTagName("*").length
@mrmrs
mrmrs / gist:6315378
Created August 23, 2013 03:51
Run csslint on every file in a directory. Output results to lint_$filename.
for file in *; do csslint $file > lint_$file;
@mrmrs
mrmrs / sass-variables-from-string.vim
Created August 25, 2013 17:08
Will reformat the string HotPink FF 69 B4 255 105 180 to $HotPink: #FF69B4; Then it will jump to the next line
I$^[/\ ^Mi: #^[lx/\ ^Mxnxnr;lD^[j0
@mrmrs
mrmrs / color_variable_naming.scss
Created September 9, 2013 20:04
Model for handling color variables.
// Single color variable named after content
$red: #ff0000;
// Multiple variables mapped to this variable.
$font-color: $red;
$secondary-bg: $red;