Skip to content

Instantly share code, notes, and snippets.

View renatolond's full-sized avatar

Renato "Lond" Cerqueira renatolond

View GitHub Profile

Keybase proof

I hereby claim:

  • I am renatolond on github.
  • I am renatolond (https://keybase.io/renatolond) on keybase.
  • I have a public key whose fingerprint is 2410 F6C7 04CD B8D1 0B58 FD8A 2A83 4216 4A4A ABE5

To claim this, I am signing this object:

@renatolond
renatolond / vimdiff.md
Created April 21, 2016 13:53 — forked from mattratleph/vimdiff.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)

Verifying that +renatolond is my blockchain ID. https://onename.com/renatolond
@renatolond
renatolond / areloperations.md
Last active September 20, 2015 14:32
Be aware of Arel operations in Rails

When I started Internet Video Game Library, I didn't know much about Rails and ended up using an Arel operation to do a Union between two queries I needed to do. The bad thing is that arel is an internal rails library and as such, there's no guarantee that it will keep doing the things the way you expect it to. It's recommended that you only use things through the ActiveRecord api. So, when I updated the rails in IVGLib from 4.1 to 4.2, this operation stopped working. Lucky me I had tests that tested this!

I had something like this:

def self.shelf_items_from_shelf_with_platform(game_shelf_id, platform_id)
	arel_shelf_items = self.shelf_items_editions_from_shelf_with_platform(game_shelf_id, platform_id).union(
		self.shelf_items_expansions_from_shelf_with_platform(game_shelf_id, platform_id))
#include "lolevel.h"
#include "platform.h"
#include "core.h"
const char * const new_sa = &_end;
/* Ours stuff */
extern long wrs_kernel_bss_start;
extern long wrs_kernel_bss_end;