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_relative 'spec/spec_helper.rb' | |
require 'pry-byebug' | |
class SpecFile | |
CREATE = ' create(:'.freeze | |
BUILD_STUBBED = ' build_stubbed(:'.freeze | |
attr_reader :file_name, :content_array | |
def initialize(file_name) |
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'mongoid' | |
gem 'benchmark' | |
gem 'pry-byebug' | |
end | |
class A |
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
// ==UserScript== | |
// @name Blacklist Youtube Channels | |
// @version 1 | |
// @grant GM.setValue | |
// @grant GM.getValue | |
// @include https://www.youtube.com/* | |
// ==/UserScript== | |
const blacklistChannelName = 'BlacklistYoutubeChannels'; | |
var channels = []; |
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'mongoid', '~> 7.0' | |
gem 'mongoid_relations_dirty_tracking', github: 'tablecheck/mongoid_relations_dirty_tracking' | |
gem 'pry-byebug' | |
end | |
Mongoid.configure do |config| |
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
FROM ruby:2.5 | |
ENV LANG="C.UTF-8" \ | |
APP_HOME="/app" \ | |
BUNDLE_SILENCE_ROOT_WARNING="1" | |
RUN mkdir -p $APP_HOME | |
WORKDIR $APP_HOME |
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 BubbleArray < Array | |
def sort | |
dup.sort! | |
end | |
def sort! | |
return self if self.size <= 1 | |
for i in 0...size | |
swapped = false |
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
x=0;$.each($('table tbody td:nth-child(6)'), function(index, el){var n=Number($(el).text());if(n<100) x=x+n});x |