Skip to content

Instantly share code, notes, and snippets.

View sonirico's full-sized avatar
🇨🇳
努力搬砖 💪

Marquitos sonirico

🇨🇳
努力搬砖 💪
View GitHub Profile
@sonirico
sonirico / redis_dump.sh
Created October 27, 2024 23:41
redis dump minimal script
#!/usr/bin/env bash
REDIS_SOURCE_PORT=2222
redis-cli -p $REDIS_SOURCE_PORT --scan | while read -r key; do
redis-cli -p $REDIS_SOURCE_PORT -D "" --raw dump "$key" > key.dump ;
redis-cli -X dump_tag restore $key 0 dump_tag replace < key.dump
done

Keybase proof

I hereby claim:

  • I am sonirico on github.
  • I am sonirico (https://keybase.io/sonirico) on keybase.
  • I have a public key ASA14o9VxMIFoNgKkGIiHmC_jV1w01FpyyK76acQtxMoEAo

To claim this, I am signing this object:

@sonirico
sonirico / ScriptSystem.java
Last active December 25, 2016 07:01
ScriptSystem, ECS pattern (artemis-odb).
package com.katodia.istariquest.systems;
import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.PooledComponent;
import com.artemis.World;
import com.artemis.systems.IteratingSystem;
import java.util.HashMap;
import java.util.Map;