Skip to content

Instantly share code, notes, and snippets.

View grafluxe's full-sized avatar

Leandro Silva grafluxe

View GitHub Profile
[user]
name = {name}
email = {username}@users.noreply.github.com
[color]
ui = true
[alias]
s = status
ll = log --oneline
[
{
"key": "cmd+d",
"command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
{
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.minimap.enabled": false,
"editor.rulers": [
{
"column": 80,
"color": "#303030"
}
@grafluxe
grafluxe / deepMerge.js
Last active January 31, 2019 21:05
Deep merges 2 objects in a functional way
const deepMerge = (obj1, obj2) =>
Object.keys(obj1).reduce((acc, key) => {
if (obj1[key] instanceof Array) {
acc[key] = [];
obj1[key].forEach(
(_, i) => acc[key][i] = deepMerge(obj1[key][i], obj2[key][i])
)
} else if (obj1[key] instanceof Object) {
acc[key] = deepMerge(obj1[key], obj2[key]);
} else {
export CLICOLOR=1
export LSCOLORS=dxfxcxdxbxegedAbAgacdx
export PATH="/usr/local/bin:$PATH"
cyan="$(tput setaf 6)";
reset="$(tput sgr0)";
PS1='\[$cyan\]> \W \$ \[$reset\]';
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash;
@grafluxe
grafluxe / .vimrc
Last active November 17, 2020 19:50
syntax on
colorscheme desert
autocmd Filetype gitcommit set textwidth=72
set colorcolumn=+1
highlight ColorColumn ctermbg=233 ctermfg=white
set spell
highlight SpellBad ctermfg=196 ctermbg=0
highlight SpellCap ctermbg=0 cterm=underline
@grafluxe
grafluxe / gendoc.php
Created December 16, 2016 20:03
Easily create PHP docs for your project using apigen (apigen.org)
<?php
/**
* @author Leandro Silva | Grafluxe, 2016
*/
/**
* Easily create PHP docs for your project using apigen (apigen.org).
*
* To keep things simple, apigen CLI options are automatically set.