Skip to content

Instantly share code, notes, and snippets.

View justincastilla's full-sized avatar

Justin Castilla justincastilla

  • Seattle, Wa
  • 18:19 (UTC -07:00)
View GitHub Profile

Endpoints, Responses, Triggers, and Redis Logs

Action: Enter 'Pi' into search bar

Endpoint: /search

Response :

[
    {

Keys:

com.redislabs.demos.redisbank.transactions.BankTransaction

A set of transaction IDs

balance_ts

TS for visualization of total balance over time. No extra options set.

This file has been truncated, but you can view the full file.
[
{
"author_name": "Jennifer L. Armentrout",
"base_id": 18161,
"book_description": "Starting over sucks.When we moved to West Virginia right before my senior year, I\u2019d pretty much resigned myself to thick accents, dodgy internet access, and a whole lot of boring\u2026 until I spotted my hot neighbor, with his looming height and eerie green eyes. Things were looking up.And then he opened his mouth.Daemon is infuriating. Arrogant. Stab-worthy. We do not get along. At all. But when a stranger attacks me and Daemon literally freezes time with a wave of his hand, well, something\u2026 unexpected happens. The hot alien living next door marks me.You heard me. Alien. Turns out Daemon and his sister have a galaxy of enemies wanting to steal their abilities, and Daemon\u2019s touch has me lit up like the Vegas Strip. The only way I\u2019m getting out of this alive is by sticking close to Daemon until my alien mojo fades. If I don\u2019t kill him first, that is.",
"book_title": "

RU101[LIVE] Week 4

Geospatial Indexing

Geospatial objects include coordinate pairs (latitude and longitude) and a name. The coordinates are transformed into a GEOHASH, which is a string combination of letters and numbers.

For Redis, we transform this hash into a 52-bit integer. We then store the name and 52-bit integer into a sorted Set, with the integer hash being the score and the name as the member.

We can still use all of the Sorted Set commands on a Geospatial Index, with a few exceptions covered later.

@justincastilla
justincastilla / week2.md
Last active April 20, 2022 18:32
RU101[LIVE] - Week 2 Streaming Commands

RU101[LIVE] Week 2 Cheat Sheet

Lists

Lets first populate our last_5_played list data type with some songs:

LPUSH last_5_played "Hildur_Gudnadottir:The_Door" "Brian_Eno:Iris"  "Mica_Levi:Love"
"Philip_Glass:Glassworks:_Opening" "Chihei_Hatakeyama:Sad_Ocean" "Colin_Stetson:Reborn"
"Johann_Johannsson:Arrival" "Sarah_Davachi:Gilded" "Christina_Vantzou:Homemade_Mountains"
@justincastilla
justincastilla / creating_a_redis_cluster.md
Last active February 14, 2024 04:28
Creating a Redis Cluster

Step 1

To create a cluster, we need to spin up a few empty Redis instances and configure them to run in cluster mode.

Here’s a minimal configuration file for Redis Cluster:

# redis.conf file
port 7000
### Keybase proof
I hereby claim:
* I am justincastilla on github.
* I am justin_castilla (https://keybase.io/justin_castilla) on keybase.
* I have a public key ASBzlAGU6Z9UqnBZ2cavB6wJRvzuZ8Yfp1yO6rYwplExaQo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am justin-castilla on github.
* I am justin_castilla (https://keybase.io/justin_castilla) on keybase.
* I have a public key ASBzlAGU6Z9UqnBZ2cavB6wJRvzuZ8Yfp1yO6rYwplExaQo
To claim this, I am signing this object: