Skip to content

Instantly share code, notes, and snippets.

View jonatasdlp's full-sized avatar

Jônatas jonatasdlp

  • Banco Inter
  • Belo Horizonte - MG
View GitHub Profile
@jonatasdlp
jonatasdlp / exportOptionsAdHoc.plist
Created February 5, 2020 16:49 — forked from cocoaNib/exportOptionsAdHoc.plist
Xcode build with exportOptionsPlist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
</dict>
</plist>
@jonatasdlp
jonatasdlp / react-native.js
Created September 13, 2018 14:42 — forked from lelandrichardson/react-native.js
React Native flow types
declare var __DEV__: boolean;
declare module 'react-native' {
declare type Color = string | number;
declare type Transform =
{ perspective: number } |
{ scale: number } |
{ scaleX: number } |
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@jonatasdlp
jonatasdlp / deploy_beanstalk.sh
Created November 17, 2016 17:38 — forked from oriolgual/deploy_beanstalk.sh
Deploy to Beanstalk script taken from Codeship
# Copied from http://www.codeship.io/documentation/continuous-deployment/deployment-to-elastic-beanstalk/
#!/bin/sh
export APP_VERSION=`git rev-parse --short HEAD`
pip install awscli
# clean build artifacts and create the application archive (also ignore any files named .git* in any folder)
git clean -fd
# precompile assets, ...
@jonatasdlp
jonatasdlp / migrate_s3.rake
Last active August 29, 2015 14:26
rake task to migrate paperclip attachments to Amazon S3
namespace :attachments do
task :migrate_to_s3 => :environment do
require 'aws/s3'
# Load credentials
s3_options = YAML.load_file(File.join(Rails.root, 'config/s3.yml')).symbolize_keys
bucket = s3_options[:bucket_name]
# Establish S3 connection

Capybara

save_and_open_page

Matchers

have_button(locator)
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems: