This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Similar to docker-compose.yml but not the same, 🤷♂️ | |
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
precomposeunicode = true | |
[remote "origin"] | |
url = https://github.com/fanhero/super-admin-portal.git | |
fetch = +refs/heads/*:refs/remotes/origin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example got on LinkedIn (https://www.linkedin.com/groups/3242849/3242849-6143986010788216834): | |
// https://github.com/glondon/signup/blob/master/gdform.php | |
<?php | |
if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') | |
exit(header('Location: http://signupandmakemoney.com/info/ajax-error.html')); | |
session_start(); | |
/* Don't need this anymore... | |
$request_method = $_SERVER["REQUEST_METHOD"]; | |
if($request_method == "GET"){ | |
$query_vars = $_GET; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cucumber example feature in Gherkin. | |
Feature: Example feature | |
As an user of Cucumber.js | |
I want to have documentation on Cucumber | |
So that I can concentrate on building awesome applications | |
Scenario: Reading documentation | |
Given I am on the Cucumber.js GitHub repository | |
When I go to the README file |
NewerOlder