Turl
TinyURL service in Ramaze
Install / Use
/learn @zh/TurlREADME
TinyURL Ramaze Application
Required gems
sqlite3-ruby, sequel, validatable, ramaze, thin
Features
- everything in one file - model, view, controller
- auto create the database if missing
- unique urls in the database
- url hits counting
- API for command-line access - can shorten urls and restore the original urls
Usage
$ curl -O turl.rb "http://github.com/zh/turl/tree/master%2Fturl.rb?raw=true" $ ruby turl.rb
browse http://localhost:7000/
shorten url (turl)
$ curl http://admin:secret@localhost:7000/_api?turl=http://github.com/zh/turl/
restore the original url
$ curl http://admin:secret@localhost:7000/_api?url=abc
number of hints for given turl
$ curl http://admin:secret@localhost:7000/_api?hits=abc
Do not forget to change the BASE_URL and LOGINS values. By default the database file (sqlite3) will be created in the same directory with turl.rb. If this is not acceptable, change the DB_FILE line.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
