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 Model < ActiveRecord::Base | |
enum status: { | |
cancelled: 'cancelled', | |
delayed: 'delayed', | |
final: 'final', | |
suspended: 'suspended' | |
} | |
end |
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
vars: | |
starfighters: | |
- username: patrick | |
github: patio11 | |
name: "Patrick McKenzie" | |
- username: thomas | |
github: tqbf | |
name: "Thomas Ptacek" | |
- username: erin | |
github: boboTjones |
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 'bundler/inline' | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'octokit', '~> 4.1.0' | |
end | |
CHANGELOG_PATH = 'CHANGELOG.md' | |
def get_releases |
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
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Load tasks from gems | |
require 'capistrano/bower' | |
require 'capistrano/gulp' | |
require 'capistrano/npm' |
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 TrackedHash < SimpleDelegator | |
attr_reader :accessed_keys | |
def initialize(hash) | |
super | |
@accessed_keys = Set.new | |
end | |
def [](key) | |
@accessed_keys << key |
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
const WHITELIST = [ | |
'https://cdn.theathletic.com' | |
] | |
const ALLOW = { cancel: false }; | |
const DENY = { cancel: true }; | |
chrome.webRequest.onBeforeSendHeaders.addListener((req) => { | |
var cancel = null; |
A Holiday gift exchange is where a group of people are randomly assigned one other person in the group to buy a gift for. This person can be anyone else in the group except for themselves. Everyone should both give and receive a gift.
Design a program that reads a provided CSV file, performs the matching, and then prints out the matches. Assume that you may email the match to the person later, but focus on printing first.
The format of the CSV is name,email
on each row.
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
<?php | |
/** | |
* composer require sentry/sentry-sdk | |
*/ | |
use Sentry; | |
Env::init(); | |
// Bedrock application config... | |
if (env('SENTRY_DSN')) { | |
Sentry\init([ | |
'dsn' => env('SENTRY_DSN'), |
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'graphql', '1.10.10' | |
end | |
class BaseArgument < GraphQL::Schema::Argument | |
def initialize(*args, **kwargs, &block) | |
super(*args, prepare: method(:convert_id), **kwargs, &block) |
OlderNewer