Skip to content

Instantly share code, notes, and snippets.

View fbatista's full-sized avatar
🏡
Working from home

Fábio Batista fbatista

🏡
Working from home
View GitHub Profile
@fbatista
fbatista / mtgo_commander_banlist.txt
Created September 30, 2024 18:14
Old MTGO Commander Banlist by WOTC
Ancestral Recall
Arcum Dagsson
Back to Basics
Balance
Bazaar of Baghdad
Biorhythm
Black Lotus
Braids, Cabal Minion
Channel
Derevi, Empyrial Tactician
@fbatista
fbatista / tsim.rb
Created November 24, 2023 19:41
Tournament Sim to check bye impact
POINTS_PER_WIN = 5
POINTS_PER_BYE = 4
POINTS_PER_DRAW = 1
DRAW_CHANCE = 0.15
NUMBER_OF_PLAYERS = 51
TOP_CUT = 16
ITERATIONS = 10
Player = Struct.new(:id, :name, :opponents, :points, :tiebreakers, :matched, :skill, keyword_init: true) do |new_class|
@fbatista
fbatista / tournament_sim.rb
Last active September 21, 2023 09:31
Tournament Matchmaking simulator, top-bottom approach
POINTS_PER_WIN = 5
POINTS_PER_DRAW = 1
DRAW_CHANCE = 0.28
NUMBER_OF_PLAYERS = 51
Player = Struct.new(:id, :name, :opponents, :points, :tiebreakers, :matched, keyword_init: true) do |new_class|
def played_against?(player)
opponents.include?(player)
end
@fbatista
fbatista / report.md
Last active December 14, 2021 17:56
Krark-sakashima report

Krark / Sakashima Tournament Report

  • Tournament: Quest for the Cradle xmas special
  • Organizer: cEDH Portuguese League
  • Attendance: 40 players
  • Prizes: Gaea's Cradle; Revised Mana Vault; Ice Age Necropotence; Barrin, Master Wizard - JAP
  • Structure: 4 Swiss rounds using squirebot for pairings and tiebreakers followed by a cut to top 16 semi final single elimination to final table.
  • Time Limit: 75 mins per swiss round, 75 mins on semi final, and until venue closes for final table.
  • REL: competitive [^1]
@fbatista
fbatista / UIImage+Quad2Quad.mm
Last active December 12, 2015 10:08
Quadrilateral transform, for perspective correction, using OpenCV warpPerspective
struct LEQuad
{
CGPoint topLeft, topRight;
CGPoint bottomLeft, bottomRight;
};
typedef struct LEQuad LEQuad;
// Category on UIImage
@implementation UIImage (Quad2Quad)
@fbatista
fbatista / gist:4495149
Last active December 10, 2015 21:28
Convert NSData to a string of bits : "001100111001110011" ... Useful for debugging
//.h
@interface NSData (BinaryString)
- (NSString*)toBinaryString;
@end
//.m
@implementation NSData (BinaryString)
@fbatista
fbatista / main.coffee
Created August 30, 2012 14:12
Partial live updates issue
posts_frag = Meteor.ui.render ->
Meteor.ui.listChunk Posts.find({}, {sort: {created_at: -1}}),
(post)->
comment_frag = Meteor.ui.listChunk Comments.find({post_id: post._id}, {sort: {created_at: -1}}),
(comment)->
Template.comment comment
post.comments = new Handlebars.SafeString comment_frag
Template.post post
$('#post_list').append(posts_frag)

hey there, i couldnt decide where to post this, but i found that it would get more relevance to the ppl in this section, so here it goes.

i will have to take a break till at least january/2012.

after i postponed some activities in the summer to play in gamescom, my commitments keep stacking up and its about time i ideal with them. I honestly think that it could be compatible, but as time goes by, i find it harder to not play as hardcore as i once did, so despite the reasons that lead to that phenomena (addiction/ego/carelessness/interest/game awesomeness/etc) i chose not 2 play at all, and since i'm in a somewhat changing phase of my life, i believe i shouldnt have any compromises that i cant fully cope for. As so, i manifest P) my inability to be on PAX, or any other related activity during this time.

I know its stupid to do this after getting an alpha access to the game i wanted to play more in the last couple of years, but my academic "demands" and professional life dictate so. i'm sorry about it, but e

@fbatista
fbatista / gist:971221
Created May 13, 2011 20:04
Oauth2 Flow
+----------+
| |
| User |
| |
+----------+
^
|
(B)
+----+------+ Client Identifier +---------------+
| +----(A)--- & Redirect URI ------>| |
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysql /Users/fbatista/.rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle