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 ballClock { | |
constructor() { | |
this.Min = []; | |
this.FiveMin = []; | |
this.Hour = []; | |
this.Main = []; | |
} | |
modeOneCycleLength(numberOfBalls) { | |
let available = new Array(numberOfBalls).fill(0).map((n, i) => i + 1); |
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
# | |
# At CoverHound, we use conditional validations all over the form. However, there is no proper way to do | |
# this in Rails. Instead, we can provide an array of attributes (validated_fields attribute) | |
# and ensure they are the only ones to get validated. | |
# | |
module ConditionalValidations | |
attr_accessor :validated_fields | |
def field_is_required?(field) |
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 'uri' | |
require 'net/http' | |
DREAMHOST_API_KEY = ENV['DREAMHOST_API_KEY'] | |
DNS_RECORD = "host.example.com" | |
TIMER = 600 | |
abort "missing api key" if DREAMHOST_API_KEY.nil? | |
Process.daemon |
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
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { | |
dist: { | |
options: { |
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
var FeedSchema = new Schema({ | |
title: String, | |
description: String, | |
link: String, | |
rss: String, | |
pubdate: Date, | |
updated: { type: Date, default: Date.now }, | |
items: [{type: Schema.Types.ObjectId, ref: 'Item'}], | |
}); |