Skip to content

Instantly share code, notes, and snippets.

View batoreh's full-sized avatar

Neto "batoreh" Guimarães batoreh

View GitHub Profile
function decimal(number) {
return ({
toBase: (base) => {
let remainder = number
let result = []
let shouldDivide = true
while (shouldDivide) {
result[result.length] = remainder % base
remainder = Math.floor(remainder / base)
@batoreh
batoreh / console.md
Last active December 28, 2018 17:58
As outras faces do console

console info/warn/error

console.log('log test');

console.warn('log test');

console.error('log test');
/**
* Creates a reducer.
* @param {string} initialState - The initial state for this reducer.
* @param {object} handlers - Keys are action types (strings), values are reducers (functions).
* @return {object} A reducer object.
*/
export default (initialState = null, handlers = {}) => (state = initialState, action) => {
if (!action && !action.type) return state;
const handler = handlers[action.type];
return handler && handler(state, action) || state;
export EDITOR=/usr/bin/vim
test -s ~/.alias && . ~/.alias || true
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
branch_name() {
git branch 2> /dev/null | grep "\*" | cut -b 3-
tint2 &
nitrogen --restore &
xset r rate 200 30 &
amor &
mate-terminal &
redshift &
slack &
synapse &
volumeicon &
rofi -key-run F3 &
#### ALIASES ####
alias ls='ls -la'
## GIT
alias blame='git blame'
alias checkb='git checkout -b'
alias checkout='git checkout'
alias st='git status'
alias stash='git stash'
alias branchl='git branch list'
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'ctrlpvim/ctrlp.vim'
#---- Generated by tint2conf ab9d ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Backgrounds
# Background 1: Launcher, Panel
rounded = 0
border_width = 0
background_color = #000000 40
border_color = #828282 0
from os import listdir, getcwd
from pydub import AudioSegment
import re
def reverse_audio_files(audio_file):
audio = AudioSegment.from_wav(audio_file)
return audio.reverse()
cwd = getcwd()
dirlist = listdir(cwd);

#VIM // Básico/Intermediário #

Por Aurélio Marinho Jargas/ Adaptado por Neto Guimarães

http://aurelio.net/vim/

No VIM temos vários "modos", que são estados do editor. São eles:

MODO TECLA RODAPÉ     DESCRIÇÃO
de inserção        i --INSERT--     Inserção de texto