View request.rb
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
class Request | |
attr_reader :exception, :response | |
def initialize(context = {}) | |
@context = context | |
end | |
def execute | |
@response ||= Response.call(execute_request) | |
self |
View git config global
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
[color] | |
ui = true | |
[user] | |
name = Chris Oliver | |
email = excid3@gmail.com | |
signingkey = 0E881BAF04745832 | |
[color "diff-highlight"] | |
oldNormal = red bold | |
oldHighlight = red bold 52 | |
newNormal = green bold |
View vimrc
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
View authenciates_with_two_factor.rb
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
# frozen_string_literal: true | |
# == AuthenticatesWithTwoFactor | |
# | |
# Controller concern to handle two-factor authentication | |
module AuthenticatesWithTwoFactor | |
extend ActiveSupport::Concern | |
def prompt_for_two_factor(user) | |
@user = user |
View applocales.rb
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
require 'yaml' | |
class LocaleGroup | |
attr_reader :output | |
def initialize | |
@output = {} | |
@output.default_proc = -> (h, k) { h[k] = Hash.new(&h.default_proc) } | |
end |
View index.rb
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
# frozen_string_literal: true | |
require 'json' | |
require 'net/http' | |
require 'time' | |
require 'yaml' | |
require_relative './report_adapter' | |
require_relative './github_check_run_service' | |
require_relative './github_client' | |
require_relative './install' |
View user.rb
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
class User | |
def github_student_url | |
# The School ID GitHub gave you | |
school_id = "your-school-id" | |
# The secret key GitHub gave you | |
secret_key = "secret-key" | |
# The ID of the student in your database | |
student_id = id.to_s |
View _attachment.html.erb
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
<!-- app/views/attachments/_attachment.html.erb --> | |
<div class="attachment-image col-xs-6 col-sm-4 col-md-3" id="attachment_<%= @report.slug %><%= attachment.id %>elv1"> | |
<div class="row"> | |
<div class="attached-image-wrapper col-xs-12"> | |
<a class="attached-image" data-lightbox="report-attachment" style="background-image:url('<%= attachment.image_url(:preview) %>');" href="<%= attachment.image_url(:original) %>"></a> | |
</div> | |
</div> | |
<div class="attachment-options-wrapper"> |
View database.yml
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
<% | |
require 'cgi' | |
require 'uri' | |
begin | |
uri = URI.parse(ENV["DATABASE_URL"]) | |
rescue URI::InvalidURIError | |
raise "Invalid DATABASE_URL" | |
end | |
raise "No RACK_ENV or RAILS_ENV found" unless ENV["RAILS_ENV"] || ENV["RACK_ENV"] | |
def attribute(name, value, force_string = false) |
View log.sh
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
# Logfile created on 2019-02-06 14:39:16 -0800 by logger.rb/66358 | |
INFO --------------------------------------------------------------------------- | |
INFO START 2019-02-06 14:39:16 -0800 cap production deploy | |
INFO --------------------------------------------------------------------------- | |
DEBUG [a31dcb3c] Running [ -d $HOME/.rbenv/versions/2.5.3 ] as deploy@104.248.186.100 | |
DEBUG [a31dcb3c] Command: [ -d $HOME/.rbenv/versions/2.5.3 ] | |
DEBUG [7cf4009d] Finished in 9.738 seconds with exit status 0 (successful). | |
INFO [1bc30033] Running /usr/bin/env mkdir -p /tmp as deploy@104.248.186.100 | |
DEBUG [1bc30033] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.3" ; /usr/bin/env mkdir -p /tmp ) | |
INFO [815d8d82] Finished in 0.099 seconds with exit status 0 (successful). |
NewerOlder