Skip to content

Instantly share code, notes, and snippets.

@codejets
codejets / .vimrc
Created Sep 3, 2015
My local .vimrc. Heavily inspired from mdo and alexandre
View .vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
set directory=.,$TEMP
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@codejets
codejets / .aliases
Created Sep 3, 2015
.aliases which i import into my bashrc or zshrc
View .aliases
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Custom bash prompt
#
# Includes custom character for the prompt, path, and Git branch name.
#
# Source: kirsle.net/wizards/ps1.html
View core.css
.line,
.line-compress {
float: left;
width: 100%
}
a,
button {
cursor: pointer
}
View .vimrc_pi
" vim:fdm=marker
" Settings -------------------------------------------------------------
" Preamble {{{
" Make vim more useful {{{
set nocompatible
" }}}
View .bashrc_git
alias git='hub'
alias g='git status -sb'
alias gh='git hist'
alias gp='git pull'
alias gpr='git pull --rebase'
alias gpp='git pull --rebase && git push'
alias gf='git fetch'
alias gb='git branch'
alias ga='git add'
alias gc='git commit'
View sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete": true,
"auto_indent": true,
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_encoding": "UTF-8",
"detect_indentation": true,
"draw_indent_guides": true,
View Origami Conf Default (OSX).sublime-keymap
[
{ "keys": [":", "v", "s", "p"], "command": "create_pane", "args": {"direction": "right", "give_focus": true} },
{ "keys": [":", "s", "p"], "command": "create_pane", "args": {"direction": "down", "give_focus": true} },
{ "keys": [":", "b", "d"], "command": "destroy_pane", "args": {"direction": "self"} },
]
@codejets
codejets / Preferences.sublime-settings
Created Mar 16, 2016
current sublime preferences
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete": true,
"auto_indent": true,
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_encoding": "UTF-8",
"detect_indentation": true,
"draw_indent_guides": true,
@codejets
codejets / constructor.es6.js
Created Mar 19, 2016
ES6 implementation of Constructor Pattern
View constructor.es6.js
/* We now a have clean class based design like other languages out there.*/
class todo {
constructor(name) {
// Adds the name of the object
this.name = name;
// As Default completed is set to false.
@codejets
codejets / constructor.js
Last active Mar 28, 2016
Constructor Pattern Implementation
View constructor.js
/* We will use an IIFE wrapping-function to keep the global scope clean and
to prevent things from being created in the global scope. We will use strict mode in a controlled enviroment,
also without triggering it in the global scope. */
var Todo = (function() {
'use strict';