An event would follow the following structure:
{
"id": <event_id>,
"pubkey": <event_creator_pubkey>,
"created_at": <timestamp>,
"kind": <event_kind>,
defmodule BloomFilter do | |
@moduledoc """ | |
A small Bloom Filter in Elixir | |
""" | |
@default_hash_fns [:sha256, :sha512, :blake2b] | |
defstruct bits: <<0::size(64)>>, hash_fns: @default_hash_fns |
#ifndef ROBOT_CONTROL_H | |
#define ROBOT_CONTROL_H | |
#include <ArxContainer.h> | |
#include <IRremote.hpp> | |
/*! | |
* @brief Alias for uint8_t to enhance code readability. | |
*/ | |
using uint8_t = u8; |
require "faye/websocket" | |
require "cbor" | |
require "base32" | |
SubscribeReposEndpoint = "wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos" | |
# Decode CBOR data into JSON as it appears | |
def decode_cbor_data(data) | |
CBOR::Unpacker.new(StringIO.new(data)) | |
.each.to_a |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"os" | |
) | |
const ( |
package main | |
import ( | |
"C" | |
"bufio" | |
"crypto/tls" | |
"fmt" | |
"io/ioutil" | |
"net" | |
"net/url" |
#!/usr/bin/env python3 | |
import argparse | |
from mnemonic import Mnemonic | |
import sys | |
def encode(mnemonic_str): | |
m = Mnemonic("english") | |
words = m.to_mnemonic(mnemonic_str.encode("utf-8")) | |
return words |
require 'json' | |
module JSONObject | |
def self.create(json) | |
data = JSON.parse(json) | |
klass = Class.new do | |
data.each do |key, value| | |
attr_accessor key.to_sym | |
define_method(:initialize) { |**args| args.each { |k, v| instance_variable_set("@#{k}", v) } } |
require 'json' | |
require 'net/http' | |
require 'date' | |
module ATProto | |
class Session | |
def initialize(username, password) | |
@atp_host = "https://bsky.social" | |
@atp_auth_token = "" | |
@did = "" | |
@username = username |
#!/bin/ruby | |
#This program calls the Bing API and returns some search json_results. | |
require "net/https" #These are just some dependencies | |
require "uri" | |
require "cgi" | |
require "json" | |
#API Info | |
def search(term, safesearch, where) | |
accessKey = ENV["BING_API_KEY"] | |
uri = "https://api.bing.microsoft.com" |