Skip to content

Instantly share code, notes, and snippets.

View samuelsimoes's full-sized avatar

Samuel Simões samuelsimoes

  • Appolus
  • Rio de Janeiro
View GitHub Profile
@jeetsukumaran
jeetsukumaran / DisableNonCountedBasicMotions.vim
Last active January 25, 2019 12:06
Disable Basic Motions if not Preceded By a Count
" Notes:
" (1) To enhance the ergonomics of this sufficiently to make it practical, at
" least, until your brain grows a new lobe dedicated to counting line offsets
" in the background while you work, you should either make sure you have
" something like the following in your `~/.vimrc`:
"
" set number
" if has('autocmd')
" augroup vimrc_linenumbering
" autocmd!
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@mislav
mislav / _readme.md
Last active May 15, 2024 11:03
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@bbonamin
bbonamin / drag_drop.rb
Created July 17, 2012 14:18
Capybara drag and drop
shared_examples_for "driver with javascript support" do
before { @driver.visit('/with_js') }
describe '#find' do
it "should find dynamically changed nodes" do
@driver.find('//p').first.text.should == 'I changed it'
end
end
describe '#drag_to' do
@sobrinho
sobrinho / factory_girl_cache.rb
Last active December 10, 2018 16:27
Object caching for factory girl
module FactoryGirl
module Strategy
class Cache
def association(runner)
runner.run(:cache)
end
def result(evaluation)
repository.read(evaluation) || repository.store(evaluation)
end
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@gf3
gf3 / html5.vim
Created May 5, 2010 15:27 — forked from rcmachado/html5.vim
vim HTML5 Syntax File
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://rm.blog.br/vim/syntax/html.vim
" Last Change: 2009 Aug 19
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file