Skip to content

Instantly share code, notes, and snippets.

View apbarrero's full-sized avatar

Antonio Pérez Barrero apbarrero

View GitHub Profile
@mattratleph
mattratleph / vimdiff.md
Last active September 19, 2024 18:35 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@skyscribe
skyscribe / .gdbinit
Created October 30, 2012 03:04
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@rocarvaj
rocarvaj / .vimrc
Created April 27, 2012 21:28
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@kohenkatz
kohenkatz / git-completion.tcsh
Created April 5, 2012 18:30
Source this file in your .tcshrc to get git command completion. Original source is http://gtirtha.wordpress.com/2010/05/14/git-autocomplete/ but WordPress's WSYIWYG editor messed it up and I cleaned it up.
# Source this script in tcsh to setup shell completions
# for git. Completions are activated by typing or Control-D
# in the shell after entering a partial command.
#
# Usage:
# source git-completion.tcsh (e.g. in ~/.cshrc)
#
# Supported completions:
# git (lists git commands)
# git help (lists git commands)
@seven1m
seven1m / .bashrc
Created September 21, 2011 15:09
xclip alias
alias clip='xclip -selection clipboard'
# use:
# cat /some/file | clip
@brianstorti
brianstorti / http_traffic.rb
Created July 12, 2011 16:02
Ruby Script to Capture HTTP traffic
# extracted from http://www.thekua.com/atwork/2011/07/ruby-script-to-capture-http-traffic/
require 'webrick'
include WEBrick
class Simple < WEBrick::HTTPServlet::AbstractServlet
def do_POST(request, response)
puts "Body: " + request.body
puts "Header: " + request.raw_header.to_s