Skip to content

Instantly share code, notes, and snippets.

View rawsyntax's full-sized avatar

Eric Himmelreich rawsyntax

View GitHub Profile
@rawsyntax
rawsyntax / term-mode-key-bindings.el
Last active March 15, 2018 20:20
multi-term key bindings
(add-hook 'term-mode-hook
(lambda ()
(add-to-list 'term-bind-key-alist '("M-[" . multi-term-prev))
(add-to-list 'term-bind-key-alist '("M-]" . multi-term-next))))
@rawsyntax
rawsyntax / term-mode-customizations.el
Last active December 27, 2015 08:09
turn off features in term-mode
(add-hook 'term-mode-hook
(lambda ()
(setq show-trailing-whitespace nil)
(autopair-mode -1)))
@rawsyntax
rawsyntax / theme.zsh
Last active December 27, 2015 08:09
theme fix for multi-term
if [ -n "$INSIDE_EMACS" ]; then
export ZSH_THEME="rawsyntax"
else
export ZSH_THEME="robbyrussell"
fi
@rawsyntax
rawsyntax / multi-term.el
Last active December 27, 2015 08:09
multi-term sh
(setq multi-term-program "/bin/zsh")
@rawsyntax
rawsyntax / post-checkout
Last active December 26, 2015 09:29
set git user email automatically
#!/usr/bin/env ruby
work_email = 'eric@intridea.com'
if `pwd` =~ /^\/Users\/eric\/src\/intridea/ &&
`git config --get user.email`.strip != work_email
`git config --add user.email #{work_email}`
end
@rawsyntax
rawsyntax / app.config
Created October 21, 2013 02:31
riak config
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
[
%% Riak Client APIs config
{riak_api, [
%% pb_backlog is the maximum length to which the queue of pending
%% connections may grow. If set, it must be an integer >= 0.
%% By default the value is 5. If you anticipate a huge number of
%% connections being initialised *simultaneously*, set this number
%% higher.
@rawsyntax
rawsyntax / schema_file.erl
Created October 17, 2013 16:02
schema file
%% Schema for 'search'
{
schema,
[
{version, "1.1"},
{n_val, 3},
{default_field, "value"},
{analyzer_factory, {erlang, text_analyzers, whitespace_analyzer_factory}}
],
def github(name, version, options = nil)
options ||= {}
options[:repo] ||= "boxen/puppet-#{name}"
mod name, version, :github_tarball => options[:repo]
end
github 'nginx', '1.4.0'
@rawsyntax
rawsyntax / markaby_example.rb
Last active December 18, 2015 17:19
markaby builder example
require 'markaby'
m = Markaby::Builder.new
m.div({:id => "boosh", :class => "boosh"}) do
h1("boosh", {:id => "inner"})
end
#=> "<div id="boosh" class="boosh"><h1 id="inner">boosh</h1></div>"
@rawsyntax
rawsyntax / zip.txt
Created May 8, 2013 21:35
zip codes
79936
90011
60629
90650
90201
77084
92335
78521
77449
78572