Skip to content

Instantly share code, notes, and snippets.

@michaelvobrien
Created June 18, 2012 12:50
Show Gist options
  • Save michaelvobrien/2948233 to your computer and use it in GitHub Desktop.
Save michaelvobrien/2948233 to your computer and use it in GitHub Desktop.
Simple stack for the command-line using redis.
STACK_NAME='stack'
alias stack="redis-cli lrange ${STACK_NAME} 0 -1"
alias push="redis-cli lpush ${STACK_NAME}"
alias pop="redis-cli lpop ${STACK_NAME}"
alias empty="redis-cli del ${STACK_NAME}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment