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 'google/apis/admin_directory_v1' | |
require 'googleauth' | |
module GoogleIntegration | |
class EmailAccountCreator | |
def initialize(account) | |
@account = account | |
end | |
def call |
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
#!/usr/bin/ruby | |
ALL_TRANSACTIONS = [] | |
ALL_CUSTOMERS = [] | |
class Transaction | |
attr_accessor :id, :customer_id, :description, :amount, :timestamp, :printable_time | |
def initialize(customer_id, description, amount) | |
@timestamp = Time.now | |
@printable_time = @timestamp.strftime("%m/%d/%Y | %H:%M:%S") | |
@id = Time.now.strftime("%m%d%Y%H%M%S") |
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 'salesforce_parc' | |
namespace :rankings do | |
desc "" | |
task :create_all_projects => :environment do | |
begin | |
AwrcloudApiCall.if_free_calls -> do | |
puts "Started creating rankings projects... #{Time.now}" | |
api = RubyTrac::API.new Rails.application.secrets.leadtrac_username, Rails.application.secrets.leadtrac_password | |
leadtrac_numbers = api.soap(:search_by_status, {statusId: 13026}).body[:search_by_status_response][:search_by_status_result][:string] |
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 'rubytrac' | |
require 'bcrypt' | |
require 'net/http' | |
require 'uri' | |
require 'salesforce_parc' | |
require "base64" | |
class User < ActiveRecord::Base | |
has_many :logs, as: :loggable | |
has_many :events |
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
module RankingsAPI | |
NoDateError = Class.new(StandardError) | |
NoRankingError = Class.new(StandardError) | |
ProjectExistsError = Class.new(StandardError) | |
def self.get_latest_rankings(project, api=nil) | |
api = api || AWRCloud::API.new(project.awr_account.token) | |
project.update got_rankings_at: Time.now | |
date = get_latest_ranking_report_date project, api | |
ranking_data = get_ranking project, date, api |
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 Car | |
@@WHEELS = 4 | |
def initialize(args) | |
@color = args[:color] | |
@wheels = @@WHEELS | |
end | |
def drive | |
@status = :driving | |
end | |
def brake |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
var Zoo = { | |
init: function(animals) { | |
this.animals = animals | |
}; | |
biped : function() { | |
var bipeds = []; |
NewerOlder