Skip to content

Instantly share code, notes, and snippets.

View neninja's full-sized avatar
🔥
programando na força do ódio

Neni neninja

🔥
programando na força do ódio
View GitHub Profile
@mahemoff
mahemoff / README.md
Last active September 16, 2024 18:02
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@max10rogerio
max10rogerio / yup.locale.pt-br.js
Last active May 10, 2024 17:02
Translation of the main messages from the Yup library into the Pt-Br language.
/* eslint-disable */
// For more infos, see: https://github.com/jquense/yup/blob/master/src/locale.js
import { setLocale } from 'yup'
const translation = {
mixed: {
default: '${path} é inválido',
required: '${path} é um campo obrigatório',
oneOf: '${path} deve ser um dos seguintes valores: ${values}',
notOneOf: '${path} não pode ser um dos seguintes valores: ${values}',
@rg3915
rg3915 / vim_shortcuts.md
Last active May 28, 2020 20:07
Vim commands shortcuts

Vim

Modo de inserção

  • I - insere no começo da linha.
  • A - insere no final da linha.
  • o - abre um nova linha abaixo.
  • O - abre um nova linha acima.

Navegação

@sathiyaseelan
sathiyaseelan / golang_setup.md
Last active April 1, 2024 18:51
Basics to setup a golang project repo in your local

Simple Guide to setup Golang in your Mac and clone a repo.

Setup Go and workspace

Type go in terminal, to verify the installation.

  • Create a Go workspace and set GO PATH
@davidmh
davidmh / presentation.vim
Last active August 3, 2020 13:17
Presentation mode with Goyo + vim-markdown
" https://asciinema.org/a/kE1398clJWRPPhk3lWbtvbanF
" Presentation mode
"
" use <left> and <right> to navigate the slides
"
" https://github.com/plasticboy/vim-markdown Makes folds by sections (among many other things)
" https://github.com/junegunn/goyo.vim Distraction-free writing (and reading) in Vim
function! s:enter_presentation()
@fraterblack
fraterblack / laravel-queue-em-hospedagem-compartilhada
Created June 9, 2017 17:50
Rodar Queues do Laravel em Hospedagem compartilhada - Cpanel
Rodar Queues do Laravel em Hospedagem compartilhada
//É necessário criar uma método em um controller para executar a queue
//Estou chamando a tarefa e dizendo para ser executada somente uma vez
public function queue()
{
Artisan::call('queue:restart', []);
Artisan::call('queue:work', [
'--timeout' => 60,
'--memory' => 150,
@rafael-neri
rafael-neri / validar_cpf.php
Last active August 13, 2024 13:30
Validar CPF em PHP (Completo)
<?php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;
@csswizardry
csswizardry / README.md
Last active June 16, 2024 13:44
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@jcavat
jcavat / Dockerfile
Last active September 17, 2024 15:11
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
" Add this to your vimrc to get a minimalist autocomplete pop
" Or use as a plugin : https://github.com/maxboisvert/vim-simple-complete
" Minimalist-TabComplete-Plugin
inoremap <expr> <Tab> TabComplete()
fun! TabComplete()
if getline('.')[col('.') - 2] =~ '\K' || pumvisible()
return "\<C-P>"
else