127.0.0.1:6379> memory doctor
"Hi Sam, I can't find any memory issue in your instance. I can only account for what occurs on this base."
127.0.0.1:6379> flushall
OK
127.0.0.1:6379> memory doctor
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
from machine import SPI, Pin | |
from uc8151 import UC8151 | |
import math, array, time, random | |
from microfont import MicroFont | |
import framebuf | |
spi = SPI(0, baudrate=12000000, phase=0, polarity=0, sck=Pin(18), mosi=Pin(19), miso=Pin(16)) | |
eink = UC8151(spi,cs=17,dc=20,rst=21,busy=26,speed=3,no_flickering=True,inverted=False,dangerous_reaffirm_black=True) | |
font = MicroFont("victor:R:24.mfnt",cache_chars=True) |
# Build an inverted index for a full-text search engine with Redis. | |
# Copyright (C) 2009 Salvatore Sanfilippo. Under the BSD License. | |
# USAGE: | |
# | |
# ruby invertedindex.rb add somedir/*.c | |
# ruby invertedindex.rb add somedir/*.txt | |
# ruby search your query string | |
require 'rubygems' | |
require 'redis' |
# Quick hack to stretch the .srt subtitles to match the one of your video. | |
# Check the time of the first and last sentence in your video file, then | |
# use this tool to convert the .srt file into one matching your video with: | |
# | |
# tclsh srt.tcl file.srt <your start time> <your end time> > output.srt | |
# | |
# Example: | |
# | |
# tclsh srt.tcl my.srt 00:00:24,000 00:44:15,000 > ~/Desktop/new.srt | |
# |
<? | |
require("redis.php"); | |
require("json.php"); | |
$term = $_GET['term']; | |
$r = new Redis("127.0.0.1","6379"); | |
$r->connect(); | |
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10")); |
127.0.0.1:6379> memory doctor
"Hi Sam, I can't find any memory issue in your instance. I can only account for what occurs on this base."
127.0.0.1:6379> flushall
OK
127.0.0.1:6379> memory doctor
# compl1.rb - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
require 'rubygems' | |
require 'redis' | |
r = Redis.new | |
# Create the completion sorted set | |
if !r.exists(:compl) |
<!DOCTYPE html> | |
<html> | |
<head><title>ChamberedTest</title></head> | |
<script type="text/javascript" src="js/chambered.js"></script> | |
<style type="text/css"> | |
canvas, img { | |
image-rendering: optimizeSpeed; | |
image-rendering: -moz-crisp-edges; | |
image-rendering: -webkit-optimize-contrast; |