Skip to content

Instantly share code, notes, and snippets.

View devsdmf's full-sized avatar

Lucas Mendes devsdmf

View GitHub Profile
@devsdmf
devsdmf / .bash_profile
Last active February 16, 2017 01:48
My OSX's bash_profile
[[ -s ~/.bashrc ]] && source ~/.bashrc
# exports
export CLICOLOR=1
export LSCOLORS=cxexDxgxBxegedabagacad
export PATH="/usr/local/sbin:$PATH"
# aliases
alias ll='ls -lahGF'
alias edit='nano'
"\e[1;5C": forward-word
"\e[1;5D": backward-word
set horizontal-scroll-mode off
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>AppleScrollAnimationEnabled</key>
<integer>0</integer>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.40253299474716187</real>
@devsdmf
devsdmf / commit-past.sh
Created March 23, 2017 20:01
Git commit in past
GIT_COMMITTER_DATE="`date -jR -vFebm -v16d -v12H -v29M`" git commit --date "`date -jR -vFebm -v16d -v12H -v29M`" -m "first commit"
@devsdmf
devsdmf / is_repo_dirty.sh
Last active April 3, 2018 20:10
Bash function to check if a git repository is clean [of changes] or dirty
#!/bin/bash
function is_repo_dirty {
local dir=$(pwd)
[[ -n $1 ]] && dir=$1
[[ -n $(git status --porcelain 2> /dev/null | tail -n1) ]] && return
false
}
@devsdmf
devsdmf / .vimrc
Created May 19, 2018 22:04
My Vim configuration file
" setting up plugin manager
call plug#begin('~/.vim/plugged')
" basic linux commands inside editor
Plug 'tpope/vim-eunuch'
" auto close parenthesis, brackets, quotes, etc...
Plug 'jiangmiao/auto-pairs'
@devsdmf
devsdmf / devsdmf.zsh-theme
Created May 19, 2018 22:51
My personal oh-my-zsh theme
#!/usr/bin/env zsh
local LAMBDA="%(?,%{$fg_bold[green]%}λ,%{$fg_bold[red]%}λ)"
if [[ "$USER" == "root" ]]; then USERCOLOR="red"; else USERCOLOR="cyan"; fi
# Git sometimes goes into a detached head state. git_prompt_info doesn't
# return anything in this case. So wrap it in another function and check
# for an empty string.
function check_git_prompt_info() {
if git rev-parse --git-dir > /dev/null 2>&1; then
@devsdmf
devsdmf / base_options.json
Last active March 28, 2019 16:38
Test shipping options
{
"rates": [
{
"name": "Standard Shipping",
"code": "standard",
"price": 0.00,
"price_merchant": 14.15,
"currency": "BRL",
"type": "ship",
"min_delivery_date": "2016-07-14T14:48:45-0300",
@devsdmf
devsdmf / test.js
Created May 10, 2019 17:50
Test js
alert("Test!!!!");