When you play the game of thrones, you either win or you get a merge conflict. Here are the greatest GoT quotes as real, working code.
Winter Is Coming
# Python โ Stark family DevOps
import warnings
message = "Winter Is Coming"
print(message)
warnings.warn("Prepare your production environment.", stacklevel=2)
# The North Remembers โ and so does your error log
// JavaScript
const stark = {
words: "Winter Is Coming",
sigil: "๐บ",
warn: () => console.warn("โ ๏ธ Winter is coming to production")
};
console.log(stark.words);
stark.warn();
A Lannister Always Pays Their Debts
// SQL โ the most Lannister query
SELECT "A Lannister always pays their debts" AS motto,
SUM(technical_debt) AS debt_owed,
NOW() AS payment_due
FROM codebase
WHERE quality = "poor";
You Know Nothing, Jon Snow
// JavaScript
const jonSnow = {
knowledge: null,
learn() {
if (this.knowledge === null) {
throw new Error("You know nothing, Jon Snow");
}
}
};
try { jonSnow.learn(); }
catch(e) { console.error("โ๏ธ", e.message); }
Dracarys
# Python โ burn it all down (git reset --hard)
def dracarys(repo_path):
"""Burn the codebase and start fresh"""
print("๐ฅ Dracarys!")
import subprocess
subprocess.run(["git", "reset", "--hard", "HEAD"])
print("The old code is ash. Begin anew.")
Generate any GoT quote at LoveSyntax.com. Valar Morghulis โ all snippets must be generated.