Skip to content

Instantly share code, notes, and snippets.

View gnuwilliam's full-sized avatar

William Oliveira gnuwilliam

View GitHub Profile
{
"caret_extra_width": 2,
"color_scheme": "Packages/Colorsublime - Themes/IR_Black.tmTheme",
"draw_white_space": "all",
"enable_tab_scrolling": false,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@gnuwilliam
gnuwilliam / .bashrc
Created May 4, 2016 16:21
bash config for OS X
# OS X .bashrc
# requires brew install bash-completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\e[1;91m\]\W\[\033[38;5;93m\]$(__git_ps1) \[\e[97m\]\$\[\e[0m\] '
export PACKAGE_DIRS="$HOME/work/meteor-shared"
# PS1='\[\e[1;91m\]\u@\h \w \$\[\e[0m\] '
PS1='\[\e[1;91m\]\W \[\e[97m\]\$\[\e[0m\] '
@gnuwilliam
gnuwilliam / gist:afb20e5231193c4a8c0f
Created August 24, 2015 23:25
.vimrc lua config
autocmd!
syntax on
:colorscheme inkpot
set number
set tabstop=2
set shiftwidth=2
set softtabstop=2
@gnuwilliam
gnuwilliam / git_branch_info
Created October 31, 2014 19:10
Get git branch info - shell
function parse_git_deleted {
[[ $(git status --ignore-submodules 2> /dev/null | grep deleted:) != "" ]] && echo "-"
}
function parse_git_added {
[[ $(git status --ignore-submodules 2> /dev/null | grep "Untracked files:") != "" ]] && echo '+'
}
function parse_git_modified {
[[ $(git status --ignore-submodules 2> /dev/null | grep modified:) != "" ]] && echo "*"
}
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export LANG=pt_BR.UTF-8
# shortcuts
alias gs="git status"
alias gd="git diff"
alias gc="git commit -a"
alias search="git grep"
@gnuwilliam
gnuwilliam / btn_helper.dart
Created March 16, 2014 07:03
Simple Dart helper class to add new button elements
class DartBtn {
ButtonElement addButton(id, text, btnClass, container) {
var button = new ButtonElement();
button..id = id
..text = text
..classes.add(btnClass);
querySelector(container).children.add(button);
return button;
}
}
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
// models
var Category = require('./category')
, Colors = require('./color')
, Print = require('./print')
, BaseTissue = require('./base_tissue');
var productSchema = new Schema({
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var categorySchema = new Schema({
name: String
});
module.exports = mongoose.model('Category', categorySchema);
<div class="example">
<div class="form-group has-warning">
<label class="control-label" for="inputWarning">Input with warning</label>
<input type="text" class="form-control radius" id="inputWarning">
</div>
<div class="form-group has-error">
<label class="control-label" for="inputError">Input with error</label>
<input type="text" class="form-control radius" id="inputError">
</div>