Skip to content

Instantly share code, notes, and snippets.

View rafaelanastacioalves's full-sized avatar
🎯
Focusing

Rafael Alves rafaelanastacioalves

🎯
Focusing
View GitHub Profile
// reference: http://www.arthurkoziel.com/2008/05/02/git-configuration/
Git Configuration
Published 2nd May 2008
Here are some useful configuration options for Git. Some of them, like the Bash completion, are OS X specific but should also work if you adjust the paths according to your system of choice.
Install with MacPorts:
sudo port install git-core +svn +bash_completion
@rafaelanastacioalves
rafaelanastacioalves / import_local_job.sh
Created September 20, 2016 15:41
for importing jobs for CI (Jenkins)
#!/bin/bash
# Created by Rafael Alves
#Hardcoded for localhost jenkins...
# Variables:
# $2 - Name of the created job after import. Uses the same name of the file to be imported if null
# $1 - Path to the job file to be imported
@rafaelanastacioalves
rafaelanastacioalves / calabash_android_helper_methods.rb
Last active October 29, 2017 19:46
Helper methods that I created for Android automations with Calabash.
# @author Rafael Alves <rafaelanastacioalves@gmail.com>
def scrolla_procurando_id element_id, scroll_location_id, scroll_location_query = nil, options = {}
#depois ele volta para onde ele tinha iniciado a procura
if scroll_location_query.nil?
scroll_location_query="* id:'#{scroll_location_id}'"
end
if options[:timeout].nil?
options[:timeout]=15
end
@rafaelanastacioalves
rafaelanastacioalves / calabash_ios_helper_methods.rb
Last active April 11, 2017 13:37
Helper methods that I created for iOS automations with Calabash.
# @param [String] marked The view's 'marked' attribute
# @param [String] query The complete view query (optional)
# @return [Array] return an array[String] associated with the views
# @author Rafael Alves <rafaelanastacioalves@gmail.com>
def text_array_from(marked, query = nil)
query = "* marked:'#{marked}'" if query.nil?
query(query, :text)
end
# @param [String] marked The view's 'marked' attribute
final Locale locale = new Locale("pt", "br");
view.setText(TextHelper.fromHtml(
String.format(locale,
getString(R.string.android_resource_name),
someValue
)
)
);
@rafaelanastacioalves
rafaelanastacioalves / System Design.md
Created January 5, 2023 06:29 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?