Skip to content

Instantly share code, notes, and snippets.

View kaar's full-sized avatar

Caspar Nettelbladt kaar

  • Tibber
  • Sweden
View GitHub Profile

Installation and configuration for password store

Before start:

  • Create a new private GitHub repository for the password store
  • Generate ssh key pair to use with GitHub if you haven't already
    ssh-keygen -t ed25519

Prerequisite for MacOS (skip this for Linux):

  1. Install homebrew (a prerequisite to be able to install the standard unix password manager. Homebrew can be installed via a curl command here: https://brew.sh. Installation takes a couple (5?) minutes
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@naile
naile / RedisBloomExtensions.cs
Last active January 21, 2022 05:05
Extension methods for using RedisBloom module with StackExchange.Redis
public static class RedisBloomExtensions
{
public static async Task BloomReserveAsync(this IDatabaseAsync db, RedisKey key, double errorRate, int initialCapacity)
=> await db.ExecuteAsync("BF.RESERVE", key, errorRate, initialCapacity);
public static async Task<bool> BloomAddAsync(this IDatabaseAsync db, RedisKey key, RedisValue value)
=> (bool)await db.ExecuteAsync("BF.ADD", key, value);
public static async Task<bool[]> BloomAddAsync(this IDatabaseAsync db, RedisKey key, IEnumerable<RedisValue> values)
=> (bool[])await db.ExecuteAsync("BF.MADD", values.Cast<object>().Prepend(key).ToArray());