Skip to content

Instantly share code, notes, and snippets.

View larssmit's full-sized avatar

Lars Smit larssmit

  • Gouda, The Netherlands
View GitHub Profile
@larssmit
larssmit / .tm_properties
Last active September 28, 2015 19:28
Textmate 2 tm_properties global
# ---------------------------------------------------------
# font and size
# ---------------------------------------------------------
fontName = "Menlo"
fontSize = 14
# ---------------------------------------------------------
# Display the name of the home directory
# ---------------------------------------------------------
windowTitleProject = '${projectDirectory:+ — ${projectDirectory/^.*\///}}'
@larssmit
larssmit / lsmit.zsh-theme
Created December 23, 2011 12:23
Lsmit zsh theme
# ------------------------------------------------------------------------------
# FILE: lsmit.zsh-thema
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Lars Smit <larssmit@me.com>
# VERSION: 1.0.0
# CREDITS: Sorin Ionescu (sorin.ionescu@gmail.com) /
# ------------------------------------------------------------------------------
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
@larssmit
larssmit / .gvimrc.before
Last active February 18, 2019 10:16
My MacVim settings
" -----------------------------------------------------------------------------
" VIM Configuration for Janus (https://github.com/carlhuda/janus.git)
" Lars Smit larssmit@me.com
" -----------------------------------------------------------------------------
" -----------------------------------------------------------------------------
" Basics
" -----------------------------------------------------------------------------
set encoding=utf8
@larssmit
larssmit / prettify_json.rb
Created October 20, 2012 09:50 — forked from tilo/prettify_json.rb
Ruby script to pretty print JSON on the command line (comes with Ruby's json Gem) (curl ... | prettify_json.rb)
#!/usr/bin/env ruby
require 'json'
require 'fileutils'
include FileUtils
# Parses the argument array _args_, according to the pattern _s_, to
# retrieve the single character command line options from it. If _s_ is
# 'xy:' an option '-x' without an option argument is searched, and an
# option '-y foo' with an option argument ('foo').
@larssmit
larssmit / .zshrc
Created October 27, 2012 14:44
My .zshrc
ZSH=$HOME/.oh-my-zsh
ZSH_THEME ="lsmit"
CASE_SENSITIVE ="false"
plugins=(git autojump brew bundler cap encode64 extract gem heroku jira jruby node npm osx python rails rails3 rake rbenv redis-cli ruby ssh-agent sublime textmate vagrant)
source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH="$HOME/.rbenv/bin:$PATH"
@larssmit
larssmit / .gitconfig
Created November 24, 2012 14:35
My .gitconfig
[user]
name = Lars Smit
email = larssmit@me.com
[push]
default = current
[alias]
st = status
ci = commit
br = branch
df = diff
@larssmit
larssmit / README.md
Created December 26, 2012 11:21 — forked from dergachev/README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@larssmit
larssmit / .tm_properties
Created January 30, 2013 06:19
TextMate 2 .tm_properties with default settings for each RoR project.
projectDirectory = '$CWD'
windowTitleProject = '${projectDirectory:+ — ${projectDirectory/^.*\///}}'
windowTitleFramework = '${TM_DIRECTORY/.*\/Frameworks\/([^\/]+)\/.*|.*/${1:+ ($1)}/}'
windowTitle = '$TM_DISPLAYNAME$windowTitleFramework$windowTitleProject$windowTitleSCM'
excludeFiles = "{destroy,tmtags,tmtagsHistory,tags,.tm_properties,.htaccess,.gitignore,dump.rdb,*rid,*lock,*log,*sh}"
excludeInFolderSearch = "{destroy,tmtags,tmtagsHistory,tags,.tm_properties,.htaccess,.gitignore,dump.rdb,*rid,*lock,*log,*sh}"

Capybara

save_and_open_page

Matchers

have_button(locator)
@larssmit
larssmit / tm2iterm.rb
Created March 5, 2014 13:45
Builds an itermcolors scheme file for iTerm2 from a Textmate tmTheme
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from