Socket
Book a DemoInstallSign in
Socket

circule

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circule

0.1.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

Circule

Generate an icon of overlapping circles derived from a hash.

  • Slice the hash into 16-bit slices starting at bit bn, stepping s bits at a time, ending after bit bn.

  • From each slice define a circle such that bits 0 through 4 is the x coordinate of the center, bits 5 through 9 is the y coordinate of the center, and bits 10 through 15 is the radius of the circle.

  • Each pixel in the output will be colored based on the number of circles that point is inside.

The demo video shows how the final image is composed.

Installation

Add this line to your application's Gemfile:

gem 'circule'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install circule

Usage

CLI Options

Short OptionLong OptionDescription
-h HEXSTRING--hexUse this hash
-b INTEGER--btc-blockUse hash from this bitcoin block
-0 INTEGER--bit0Starting bit
-s INTEGER--stepStep bit
-n INTEGER--bitnStarting bit
-c INTEGER--canvasCanvas size
-x INTEGER--oxOffset x
-y INTEGER--oyOffset y
-z INTEGER--zoomZoom in GUI
-f FILENAME--fileUse hash from file
-s FILENAME--saveSave image to file
-g--guiRun GUI (requires glimmer & tk)
-i--interactiveRun GUI with pry

CLI Example(s)

The icon for this project on GitLab:

$ echo -n circule | sha256sum
4b9ae43c4e15486ce131f733eff14547764623d27aa5d1d9aff45b67528f0b60  -

$ circule -h 4b9ae43c4e15486ce131f733eff14547764623d27aa5d1d9aff45b67528f0b60 -s /tmp/circule.png

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitLab at https://gitlab.com/fjc/circule.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 19 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.