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
// load Drift and other chat client here | |
// if Drift should fire first, hide other chat client -- if the other way, hide Drift. | |
window.drift.on("conversation:buttonClicked", function(data) { | |
console.log(data); | |
if (data.buttonBody == "File a ticket") { // be sure to change text to match your implementaton | |
drift.unload(); | |
// instantiate your other chat client code here (load client) | |
}; |
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
// load Drift and LiveAgent here | |
// if Drift should fire first, hide LiveAgent -- if the other way, hide Drift. | |
window.drift.on("conversation:buttonClicked", function(data) { | |
console.log(data); | |
if (data.buttonBody == "File a ticket") { // be sure to change text to match your implementaton | |
drift.unload(); | |
liveagent.startChat('57370000000TN5N'); // change for your live agent ID | |
}; |
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
<html xmlns="http://www.w3.org/1999/xhtml"><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Multipurpose Responsive Email Template</title> | |
<style type="text/css"> | |
#outlook a {padding: 0;} | |
body{width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0;} | |
.ExternalClass {width: 100%;} | |
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} | |
#backgroundTable {margin: 0; padding: 0; width: 100% !important; line-height: 100% !important;} |
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
for (i = 1; i < 21; i++) { | |
if (i % 3 === 0 && i % 5 === 0) { | |
console.log("FizzBuzz"); | |
} else if (i % 5 === 0) { | |
console.log("Buzz"); | |
} else if (i % 3 === 0) { | |
console.log("Fizz"); | |
} else { | |
console.log(i); | |
} |
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 userChoice = prompt("Do you choose rock, paper or scissors?"); | |
var computerChoice = Math.random(); | |
if (computerChoice < 0.34) { | |
computerChoice = "rock"; | |
} else if(computerChoice <= 0.67) { | |
computerChoice = "paper"; | |
} else { | |
computerChoice = "scissors"; | |
} console.log("Computer: " + computerChoice); |
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
def anonymizer | |
adjectives = [ | |
"boiling", "hidden", "bitter", "misty", "loquacious", "empty", "dry", "dark", | |
"rick-rolled", "icy", "cryptic", "quiet", "caffeinated", "cool", "radiant", "electric", | |
"patient", "superfluous", "dawn", "crimson", "furious", "dry", "blue", | |
"billowing", "broken", "cold", "bearded", "falling", "frosty", "green", | |
"long", "late", "lingering", "bold", "little", "morning", "muddy", "blazing", | |
"red", "rough", "feisty", "small", "sparkling", "throbbing", "shy", | |
"wandering", "emo", "wild", "black", "screaming", "falling", "solitary", | |
"fragrant", "shielded", "snowy", "proud", "agile", "twerking", "thirsty", |
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 'pry' | |
class Game | |
def initialize | |
puts "\nWELCOME to BLACKJACK!\n" | |
Deck.new | |
end | |
def deal_cards |
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 'pry' | |
class Game | |
puts "\nWELCOME to BLACKJACK!\n" | |
SUITS = ['♠', '♣', '♥', '♦'] | |
VALUES = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'] | |
def initialize | |
@deck = [] |
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 'Math' | |
class ArrayStatistic | |
def initialize(array) | |
@array = array | |
end | |
def largest | |
@array.sort[-1] | |
end |
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
#anagram generator | |
#so help me I will figure this out! | |
class String | |
def anagram | |
self.split(//).permutation.map { |a| a.join} | |
end | |
end | |
input = gets.chomp |
NewerOlder