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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actioncable (6.0.3.4) | |
actionpack (= 6.0.3.4) | |
nio4r (~> 2.0) | |
websocket-driver (>= 0.6.1) | |
actionmailbox (6.0.3.4) | |
actionpack (= 6.0.3.4) | |
activejob (= 6.0.3.4) |
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
curl https://github.com/[username].keys | dokku ssh-keys:add username |
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
# This policy ensures all queries and fields are disallowed by default | |
# Ensuring a whitelisting strategy | |
# | |
# Each Pundit policy should implement a field? method | |
# Which accepts a field to test if it is allowed to be used | |
class GraphqlPolicy | |
FALSE_PROC = ->(_obj, _args, _ctx) { false } | |
TRUE_PROC = ->(_obj, _args, _ctx) { true } | |
RULES = { |
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
gem install rails -v 6.0.0.beta3 | |
rails _6.0.0.beta3_ new shoulda-matchers_test | |
bin/rails g scaffold User username:string | |
rails db:migrate RAILS_ENV=test | |
# Add the following gems to the test group | |
gem 'shoulda-matchers', git: 'https://github.com/thoughtbot/shoulda-matchers.git' # Required for Rails 6 (https://github.com/thoughtbot/shoulda-matchers/pull/1193) | |
gem 'minitest-matchers_vaccine' | |
# Add some validation to the user model, see user.rb |
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
gem install rails -v 6.0.0.beta2 | |
rails _6.0.0.beta2_ new parallel-testing | |
cd parallel-testing | |
bin/rails g scaffold User username:string | |
echo "gem 'minitest-spec-rails'" >> Gemfile | |
bundle | |
bin/rails db:migrate | |
# Replace testcase with the one provided in this gist | |
bin/rails test |
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
$ ./a.out s | |
Traceback (most recent call last): | |
8: from /__enclose_io_memfs__/local/bin/rails:29:in `<main>' | |
7: from /__enclose_io_memfs__/local/bin/rails:29:in `load' | |
6: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/exe/rails:10:in `<top (required)>' | |
5: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/exe/rails:10:in `require' | |
4: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/cli.rb:7:in `<top (required)>' | |
3: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/app_loader.rb:48:in `exec_app' | |
2: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/app_loader.rb:48:in `loop' | |
1: from /__enclose_io_memfs__/local/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/app_loader.rb:53:in `block in exec_app' |
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
<div class="page-content"> | |
<div class="content"> | |
<div class="page-title"> | |
<h3>Object - <span class="semi-bold">Test</span></h3> | |
</div> | |
<div class="row"> | |
<div class="col-md-12"> | |
<div class="grid simple"> | |
<div class="grid-body no-border"> | |
<br> |
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
{ | |
"template":{ | |
"id":248797, | |
"sections":{ | |
"repeat_1:0:left_column_title":"Product 1", | |
"repeat_1:0:right_column_title":"Product 2", | |
"repeat_1:1:left_column_title":"Product 3", | |
"repeat_1:1:right_column_title":"Product 4)" | |
} | |
} |
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
jQuery('#p-m_201309 span').each(function(){ | |
span = jQuery(this) | |
if ( span.find('.video-overlay').length > 0 ) { | |
span.trigger('click') | |
} | |
}) |
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
#!/bin/bash | |
# Script will output dumps for all databases using seperate files | |
# Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
USER="" | |
PASSWORD="" | |
HOST="localhost" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
OUTPUT_DIR="" |
NewerOlder