This is a compiled list of Pristine rings across the galaxy as reported in EDDB, as of the date of this file.
The distance to that power's HQ is listed in parenthesis.
This is a compiled list of Pristine rings across the galaxy as reported in EDDB, as of the date of this file.
The distance to that power's HQ is listed in parenthesis.
#Install libsodium (python3-nacl and libsodium-dev worked for me), libopus (libopusfile0 and libopus0 worked for me), ffmpeg | |
#Install https://github.com/rg3/youtube-dl | |
require 'discordrb' | |
$isplaying = 0 | |
bot = Discordrb::Commands::CommandBot.new token: token, client_id: clientid, prefix: '.' | |
bot.command(:play) do |event, songlink| | |
if $isplaying == 1 | |
event.message.delete | |
event.respond 'Already playing music' | |
break |
This post has been moved to my org's blog.
require "json" | |
require "yaml" | |
require "./string_converter" | |
data = {test: "1", value: "3.5"} | |
json_data = data.to_json | |
yaml_data = data.to_yaml | |
class Data |
I hereby claim:
To claim this, I am signing this object:
@[Flags] | |
enum Method | |
None | |
Get | |
Post | |
Put | |
Patch | |
Delete | |
end |
module Powerbot | |
module DiscordEvents | |
module Spong | |
extend Discordrb::EventContainer | |
CHANNELS = [ | |
226941225339584513, | |
225375815087554563 | |
] |
# Encode a time into a snowflake with the given worker ID | |
def snowflake(time, worker) | |
value = time.epoch_ms << 22 | |
value | worker | |
end | |
# Decode a snowflake into a named tuple of its components | |
def decode(snowflake) | |
{time: Time.epoch_ms(snowflake >> 22), worker: snowflake & 0b1111} | |
end |
require "json" | |
# Optimized implementation of a fixed sized ring buffer that exposes | |
# a simple and "safe" API of `#push` and `#to_a`. `#push`ing to a full | |
# buffer erases the oldest member. | |
# | |
# ``` | |
# # Create a new buffer of Int32, with size 3 | |
# buffer = StaticRingBuffer(Int32, 3).new | |
# buffer.push(1) |