Skip to content

Instantly share code, notes, and snippets.

@josephbuchma
josephbuchma / vimrc.after
Last active October 27, 2016 17:31
My .vimrc.before and .vimrc.after for dotvim (https://github.com/astrails/dotvim)
" configure colors & colorscheme
if &term =~ '256color'
" disable Background Color Erase (BCE) so that color schemes
" render properly when inside 256-color tmux and GNU screen.
" see also http://snk.tuxfamily.org/log/vim-256color-bce.html
set t_ut=
endif
:function SetDarkBg()
: let g:indent_guides_auto_colors = 0
@josephbuchma
josephbuchma / vim_tmux_setup.sh
Last active August 29, 2015 14:20
Bash script for quick tmux and vim with plugins installation
#!/bin/bash
# This script setting up ready to use Tmux and Vim with plugins
# run with sudo
# Tested on Ubuntu 14.04
#
# Author: Joseph Buchma
echo 'Install Tmux'
echo '============'
@josephbuchma
josephbuchma / tmux.conf
Last active August 1, 2016 07:06 — forked from rsds143/tmux.conf
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
@josephbuchma
josephbuchma / zsh_vim_tmux_setup.sh
Last active April 18, 2016 15:46
Install prezto for zsh, tmux and vim with plugins
#!/bin/zsh
# This script installs prezto for zsh, Tmux and Vim with plugins
# run with sudo
# Tested on Ubuntu 14.04
#
# Author: Joseph Buchma
cd

Emacs + Spacemacs

Cheat Sheet

Window management (Eyebrowse)

Key BindingDescription
SPC W 1create or switch to workspace 1
SPC W 2create or switch to workspace 2
SPC W 9create or switch to workspace 9
@josephbuchma
josephbuchma / .spacemacs
Last active February 4, 2018 03:05
My .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
do $$
declare r record;
declare t record;
begin
for t in select table_name
from information_schema.tables
where table_schema='public'
loop
for r in select a.attname
from pg_catalog.pg_attribute a
@josephbuchma
josephbuchma / vget.sh
Last active December 5, 2016 13:26
Simple vendoring helper for Golang.
# vget is a simiple vendoring helper for golang.
# Example:
# vget.sh https://github.com/lib/pq dev
# will clone repository to ./vendor/github.com/lib/pq, check out `dev` and remove .git directory.
[ $# -eq 0 ] && echo 'Usage:\n\t vget <git_repo_clone_url> [git_ref]'
a=$1
p=vendor/${a:8}
if [ ! -d $p ] || [ ! -d "$p/.git" ]; then
echo 'Clone...'
{
  "index": "wsx5_answers",
  "type": "topics",
  "body": {
    "stored_fields": ["title"],
    "size": 15,
    "from": 0,
    "query": {
      "match" : {