Skip to content

Instantly share code, notes, and snippets.

@rrmartins
rrmartins / elasticsearch-setup-apple-macbook-pro-m1.md
Created July 5, 2024 10:49 — forked from todgru/elasticsearch-setup-apple-macbook-pro-m1.md
Install Elasticsearch 7.x on Apple Macbook Pro M1 Ventura 13.2

Elasticsearch Setup Apple MacBook Pro M1

Apple MacBook Pro M1, 32 GB, Ventura 13.2

Documentation based on comments in this Github Elasticsearch issue.

Install Homebrew

@rrmartins
rrmartins / tmux-cheatsheet.markdown
Created June 26, 2021 13:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@rrmartins
rrmartins / init.vim
Created April 18, 2019 13:30 — forked from prkstaff/init.vim
My NeoVim config + Dracula theme + NerdTree
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "javascript,php,python,ruby"
@rrmartins
rrmartins / gist:2926aa3c78d96fc314a720b8aa4358b8
Created September 28, 2016 12:54 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@rrmartins
rrmartins / Twelve_Go_Best_Practices.md
Created August 19, 2016 22:10 — forked from pzurek/Twelve_Go_Best_Practices.md
Twelve Go Best Practices
@rrmartins
rrmartins / postgres_array.go
Created August 16, 2016 19:00 — forked from adharris/postgres_array.go
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
{
"snippets": [
{
"match": {"global": true, "pkgname": ".", "fn": ".*_test.go"},
"snippets": [
{"text": "func Test", "title": "", "value": "func Test${1:ObjectName}${2:TestName}(t *testing.T) {\n\t$0\n}"},
{"text": "func Benchmark", "title": "", "value": "func Benchmark${1:ObjectName}${2:BenchmarkName}(b *testing.B) {\n\n\tb.StopTimer()\n\n\t$0\n\n\tb.StartTimer()\n\n\tfor i := 0; i < b.N; i++ {\n\t\t\n\t}\n\n}"},
{"text": "func Example", "title": "", "value": "func Example${1:ObjectName}${2:ExampleName}() {\n\n\t$0\n\n\t// Output:\n\t// \n\n}"}
]
}
@rrmartins
rrmartins / vim_info.md
Created September 18, 2013 17:54 — forked from todgru/vim_info.md

#vim

My .vimrc file:

syntax on
set bs=2
set expandtab
set tabstop=2
set shiftwidth=2
set number
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@rrmartins
rrmartins / gist:3488273
Created August 27, 2012 13:07
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt