Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Search Engine Optimization (SEO) helpers for Ruby on Rails
Add the "snipp" to your application's Gemfile:
gem 'snipp'
And run bundle install
command.
Call html_meta_tags
in a view template.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<%= html_meta_tags %>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
...
The priority of setting values
set_html_meta
Call set_html_meta
in a view.
set_html_meta({
title: "Page Title",
description: "Page Description",
og: {
title: "Title for Social Media"
},
link: {
canonical: "https://github.com/yulii/snipp"
}
}, {
arg: "Option Values for I18n",
page: params[:page]
})
for each controller action
I18n.t(:title, scope: [:views, params[:controller], params[:action], :meta])
default values
I18n.t(:title, scope: [:default, :meta])
For more information
app/view/snipp/html.html.erb
config/locales
Call item_tag
like content_tag
<%= item_tag :div, scope: true, type: :review do %>
<%= item_tag :span, 'Snipp', prop: :itemreviewd %>
Reviewed by <%= item_tag :span, '@yulii', prop: :reviewer %> on
<%= item_tag :time, 'April 1', prop: :dtreviewd, datetime: "2013-04-01" %>.
<%= item_tag :span, 'Review summary...', prop: :summary %>
<%= item_tag :span, 'Review description...', prop: :description %>
Rating: <%= item_tag :span, '4.5', prop: :rating %>
<% end %>
This would output
<div itemscope itemtype="http://data-vocabulary.org/Review">
<span itemprop="itemreviewed">Snipp</span>
Reviewed by <span itemprop="reviewer">@yulii</span> on
<time itemprop="dtreviewed" datetime="2013-04-01">April 1</time>.
<span itemprop="summary">Review summary...</span>
<span itemprop="description">Review description...</span>
Rating: <span itemprop="rating">4.5</span>
</div>
breadcrumb
method.<%= breadcrumb [:index, :foods, :fruits] %>
This would output something like Top > Foods > Fruits
, if you will set labels in your Rails.root/config/locales
en:
views:
breadcrumb:
# Sample
index: "Top"
food: "Foods"
food_fruit: "Fruits"
Link to root_path
, food_path
, food_fruit_path
.
Use the :s or :separator option.
<%= breadcrumb [:index, :foods, :fruits], s: "/" %>
<%= breadcrumb [:index, :foods, :fruits, { path: fruits_color_path('Red'), label: 'Red' }, { path: food_path(color: 'Red', name: 'Apple'), label: 'Apple' }], s: "/" %>
For more information, read erb files in app/view/snipp/
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)(The MIT License)
Copyright © 2013 yulii. See LICENSE.txt for further details.
FAQs
Unknown package
We found that snipp 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.