sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo reboot
This file contains hidden or 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
=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 file contains hidden or 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
SELECT objects.name FROM objects JOIN object_types ON objects.object_type_id = object_types.object_type_id AND object_types.name = 'Building' WHERE NOT EXISTS (SELECT params.object_id FROM params, attributes WHERE objects.object_id = params.object_id AND attributes.attr_id = params.attr_id AND attributes.name = 'E-mail' AND params.text_value REGEXP '^[0-9a-zA-Z_\.\-]+@.*\.[a-z]+$') |
This file contains hidden or 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
class QuestionRow | |
def initialize(internal_id: nil, chapter: nil, position: nil, text: nil, images: nil, video: nil, explanation: nil, | |
error_points: nil, prerequisite_id: nil, external_id: nil, choices: nil) | |
method(__method__).parameters.each do |type, name| | |
if type == :key | |
instance_variable_set "@#{name}", eval("#{name}") | |
self.class.class_eval { attr_reader name} | |
end | |
end | |
end |
This file contains hidden or 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
module PaymentMethods | |
class Base | |
def request_url(params) | |
raise 'Not implemented' | |
end | |
def response_notification | |
raise 'Not implemented' | |
end | |
end |
This file contains hidden or 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
# /payment_methods/ | |
# /payment_methods/obt/request.rb | |
# /payment_methods/obt/notification.rb | |
# /payment_methods/skrill/request.rb | |
# /payment_methods/skrill/notification.rb | |
# /payment_methods/base_request.rb | |
# /payment_methods/base_notification.rb | |
# /payment_provider.rb | |
module PaymentMethods |
This file contains hidden or 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
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.
We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.
It should be generic enough to work on any elixir app using mix.
If you have a elixir_buildpack.config
, then enable that section in the build script to keep versions in sync!
This file contains hidden or 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
Feature: User settings feature | |
In order to use account settings | |
As registered user | |
I want to | |
Background: | |
Given registered UNIQ_USER user logged in system | |
Scenario: sign in details, profile and mailings settings tabs exist | |
Then Profile page for UNIQ_USER should be opened |
This file contains hidden or 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
require 'rubygems' | |
require 'bundler' | |
Bundler.require(:default) | |
include FactoryGirl::Syntax::Methods | |
# Models | |
class User | |
attr_accessor :first_name, :last_name, :email, :sex | |
attr_accessor :profile |