
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
= Motivation
Liquid layouts: the practice (among other things) of rendering a single ul/li group (like this):
into a multi-column layout like this:
1 2 3 4 5 6 7 8 9 10 11
using CSS like this:
ul {width: 30%} li {width: 33%; text-align: left; float: left}But what if you wanted the data sorted by column, not by row? For this, CSS is inadequate: it's capable of flowing from left to right, top to bottom. So in order to acheive a column sorting, we need to resort the data, like this:
Using the same CSS, this would render:
1 5 9 2 6 10 3 7 11 4 8
The liquidity gem adds a "column_sort" method to the Array class, making it simple to resort your collection for a column-sorted liquid layout.
= Installation
Install the gem from rubygems.org:
= Usage
Though I would imagine you would typically be using this for doing liquid layouts on the web, for the purposes of instruction, we'll imagine that we have the following method for printing out an array:
require 'liquidity'
def print_matrix(a) a.each_slice(3) do |slice| puts slice.join("\t") end end
If we passed off the array of (1..11) to it, we would see the following printed:
a = (1..11).to_a print_matrix a
1 2 3
4 5 6
7 8 9
10 11
Now, imagine that we wanted see the matrix where the data was sorted into columns, not rows. We can use the "column_sort" method provided by the "liquidity" gem:
a = (1..11).to_a print_matrix a.column_sort(3)
1 5 9
2 6 10
3 7 11
4 8
== Passing a block to column_sort
Just like the {Array::sort}[http://ruby-doc.org/core/classes/Array.html#M002185] method, you can pass a block to column_sort.
FAQs
Unknown package
We found that liquidity 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.