Skip to content

Instantly share code, notes, and snippets.

View leompeters's full-sized avatar
😎
...

Leo M. Peres leompeters

😎
...
View GitHub Profile
@leompeters
leompeters / appium_settings_android_java.sh
Last active May 7, 2020 15:51
When install Appium, probably you will need to make it running fine with this configurations.
# When install Appium, probably you will need to make it running fine with this configurations.
# http://stackoverflow.com/a/40168992/2334082
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
# http://stackoverflow.com/a/19986294/2334082
$ export ANDROID_HOME=/Users/leomperes/Library/Android/sdk
@leompeters
leompeters / Preferences.sublime-setttings.json
Created May 15, 2017 18:51
Sublime Text User Settings
{
"always_show_minimap_viewport": true,
"color_scheme": "Packages/User/SublimeLinter/primer.light (SL).tmTheme",
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@leompeters
leompeters / Gemfile
Created July 10, 2017 01:08 — forked from chrisjacob/Gemfile
Simple guide to integrating Pages v1.0.0 with Rails v4.1.1
gem 'rails', '4.1.1'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Gems for twitter LESS -> CSS and JS support
gem 'execjs'
@leompeters
leompeters / abstract_interface.rb
Last active December 13, 2018 18:55
Building Interfaces and Abstract Classes in Ruby.
# Object Interface in Ruby.
# Suggestion of implementation for object-oriented interfaces.
#
# ===== Example
#
# bike = AcmeBicycle.new
# bike.change_gear(1)
# # => AbstractInterface::InterfaceNotImplementedError: AcmeBicycle needs to implement 'change_gear' for interface Bicycle!
#
# See:: http://www.metabates.com/2011/02/07/building-interfaces-and-abstract-classes-in-ruby
@leompeters
leompeters / my_custom_error.rb
Last active May 7, 2020 15:43
Ruby custom error classes: inheritance of the message attribute.
# Ruby custom error classes: inheritance of the message attribute.
#
# Create a custom exception class in Ruby.
#
# ===== Example:
#
# begin
# raise MyCustomError.new(my_object), "a message"
# rescue MyCustomError => e
# puts e.message # => "a message"
@leompeters
leompeters / Dockerfile
Created July 22, 2020 16:37 — forked from YusukeIwaki/Dockerfile
rails new
FROM ruby:2.6-alpine
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN bundle init
RUN sed -i -e 's/# gem "rails"/gem "rails"/' Gemfile
# For installing Nokogiri (ref: https://copo.jp/blog/2016/03/alpine-%E3%81%AE-ruby-%E3%81%AE%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%81%AB-nokogiri-%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/ )
RUN apk add --no-cache build-base libxml2-dev libxslt-dev
@leompeters
leompeters / test.yml
Created July 29, 2020 02:46 — forked from vvo/test.yml
Rails and PostgreSQL setup for GitHub actions (CI)
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# Similar to docker-compose.yml but not the same, 🤷‍♂️
services: