
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.
Simple batch operations using mixpanel-ruby
mixpanel-ruby-batch adds a simple interface for performing batch operations using the mixpanel-ruby[https://github.com/mixpanel/mixpanel-ruby] gem.
mixpanel-ruby[https://github.com/mixpanel/mixpanel-ruby] already provides a BufferedConsumer class to facilitate batch operations:
buffered_consumer = Mixpanel::BufferedConsumer.new
begin
tracker = Mixpanel::Tracker.new(YOUR_TOKEN) do |type, message|
buffered_consumer.send(type, message)
end
tracker.track("Signup Begin")
tracker.track("Signup Complete", {'User Sign-up Cohort' => 'July 2013'})
tracker.track("Welcome Email Sent", {
'Email Template' => 'Pretty Pink Welcome',
'User Sign-up Cohort' => 'July 2013'
})
ensure
buffered_consumer.flush
end
mixpanel-ruby-batch adds a slightly higher-level API by adding the
Mixpanel::Events#track_batch
and Mixpanel::People#batch
methods.
gem install mixpanel-ruby-batch
# Tracks a batch of events for a single distinct_id.
# Events should be passed as an array, with each element either a
# Hash or a string. Each Hash element should have a single key (the event name,
# as a string) with the value a Hash of properties. Each string element
# will be interpreted as an event name with no properties.
tracker = Mixpanel::Tracker.new
tracker.track_batch("12345", [
"Signup Begin",
{
"Signup Complete" => {
"User Sign-up Cohort" => "July 2013"
}
},
{
"Welcome Email Sent" => {
"Email Template" => "Pretty Pink Welcome",
"User Sign-up Cohort" => "July 2013"
}
}])
# Send a generic batch update to \Mixpanel people analytics.
# The profile updates should be passed as an array of Hash objects.
# Each has should have a single string key that is the distinct id
# on which the perform the updates. The value should be a Hash with valid
# operation names (e.g. "$set", "$unset") as keys and the appropriate data
# for each operation as values. For details about the operations and their
# expected data, see the documentation at # https://mixpanel.com/help/reference/http
tracker = Mixpanel::Tracker.new
tracker.people.batch([
{
"12345" => {
"$set" => {
"$firstname" => "David"
},
"$unset" => ["Levels Completed"]
}
},
{
"67890" => {
"$set" => {
"$firstname" => "Mick"
},
"$unset" => ["Levels Completed"]
}
}
])
Both methods handle slicing the data into 50-message chunks, so it is safe to pass as many messages to either message as memory will allow.
For more information please visit:
FAQs
Unknown package
We found that mixpanel-ruby-batch 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.