Skip to content

Instantly share code, notes, and snippets.

@asrivascrealytee
asrivascrealytee / git.md
Last active March 13, 2019 12:39
Get the contributors for this bugfix
  • git shortlog -sn --no-merges master..Some-bug-fix
@asrivascrealytee
asrivascrealytee / Makefile
Last active March 12, 2019 14:07
spawn local nomad consul
default : nomad consul
.PHONY: nomad consul
nomad:
wget https://releases.hashicorp.com/nomad/0.9.0-beta3/nomad_0.9.0-beta3_linux_amd64.zip
unzip nomad_0.9.0-beta3_linux_amd64.zip
consul:
wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip
unzip consul_1.4.3_linux_amd64.zip
@asrivascrealytee
asrivascrealytee / grafana.nomad.hcl
Created March 11, 2019 16:17
Grafana+loki+promtail nomad example
job "grafana" {
datacenters = ["dc1"]
type = "service"
group "grafana" {
count = 1
restart {
attempts = 10
interval = "5m"
```
Command Editing Shortcuts
Ctrl + a – go to the start of the command line
Ctrl + e – go to the end of the command line
Ctrl + k – delete from cursor to the end of the command line
Ctrl + u – delete from cursor to the start of the command line
Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
Ctrl + xx – move between start of command line and current cursor position (and back again)
Alt + b – move backward one word (or go to start of word the cursor is currently on)
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
export PATH
### curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
@asrivascrealytee
asrivascrealytee / .ripgreprc
Created February 20, 2019 13:07
ripgreprc
# Don't let ripgrep vomit really long lines to my terminal.
--max-columns=150
# Add my 'web' type.
--type-add
web:*.{html,css,js}*
# Because who cares about case!?
--smart-case