Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Caleidenticon creates caleidoscope-like identicons.
It is based on RubyIdenticon by Chris Branson which in turn was based on go-identicon by Damian Gryski.
require 'caleidenticon'
Create an identicon png and save it to a path:
Caleidenticon.create_and_save(user.email, user.identicon_path, {salt: my_salt})
create_and_save takes 3 parameters:
input # a string on which to base the identicon (usually an email or username)
save_path # the storage path for the resulting identicon png file
options # a Hash (not required)
complexity: # Integer (2..n) number of elements per image. affects image size.
scale: # Integer (1..n) resolution of each element. affects image size.
density: # Integer (2..10) how densely the image is covered with elements
spikiness: # Integer (1..n) higher values produce a more pointy overall shape
corner_sprinkle: # Integer (0..n) decorates bare corners if spikiness is > 0
colors: # Array of 4 arrays with 3 Integers (0..255) each.
salt: # String of 21 alphanumeric chars, used for hashing the input.
debug: # Bool - if true, the gem will print a lot of debug information.
Using your own salt is optional, but it is recommended, as it ensures that the mapping from input to identicon will be unique to your application.
With the colors: option you can make the identicons fit in more closely with the color scheme of your app. E.g. if your app has bright green and blue colors you could do something like:
options = {salt: my_salt, colors: [[80,255,100], [80,100,255], [0,200,255], [0,255,200]]}
Caleidenticon.create_and_save(user.email, user.identicon_path, options)
Which will produce Identicons like these:
Higher values for complexity, density and scale make the generation more expensive, but the results look better at a large scale:
More complex and dense →
To test your settings, create a large number of identicons by running:
Caleidenticon.run_test(my_output_dir, number_of_identicons, my_options)
FAQs
Unknown package
We found that caleidenticon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.