I hereby claim:
- I am CallumDenby on github.
- I am cdenby (https://keybase.io/cdenby) on keybase.
- I have a public key whose fingerprint is 9236 314F 7F0A 92BC A53C B7DC 9606 29BC 3557 85EF
To claim this, I am signing this object:
const { Client } = require('discord.js'); | |
const Discord = new Client(); | |
const commands = { | |
steal: (emoji, name, message) => { | |
const emojiId = emoji.match(/([0-9]+)/)[0]; | |
if (!emojiId) return message.reply('Emoji ID not found'); | |
message.guild.createEmoji(`https://cdn.discordapp.com/emojis/${emojiId}`, name) |
# Part One | |
defmodule DayOnePartOne do | |
def compare([number, number], acc), do: acc + number | |
def compare(_, acc), do: acc | |
def calculate(nums) do | |
nums | |
|> String.split("", trim: true) | |
|> Enum.map(&String.to_integer/1) | |
|> Stream.cycle | |
|> Stream.take(String.length(nums) + 1) |
defmodule AOC do | |
def compare([first, second], acc) when first == second, do: acc + first | |
def compare(_, acc), do: acc | |
def calculate(nums) do | |
nums | |
|> String.split("", trim: true) | |
|> Enum.map(&String.to_integer/1) | |
|> Stream.cycle | |
|> Stream.take(String.length(nums) + 1) | |
|> Stream.chunk_every(2, 1, :discard) |
/* | |
The MIT License (MIT) | |
Copyright (c) 2017 Callum Denby | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
I hereby claim:
To claim this, I am signing this object: