cat vuln.json |jq -r '(["ID","NAME"] | (., map(length*"-"))), (.vulnerabilities[] | [.package_name,.package_path]) | @tsv' |column -ts $'\t'
❯ trivy --version
Version: 0.19.2
Vulnerability DB:
net set \\your_ntp_server_ip /set /yes |
# To lock | |
ssh -X user@node "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -l;" | |
# To unlock | |
ssh -X user@node "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -d;" |
find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" |
import org.apache.spark.sql.DataFrame | |
//create a new dataframe object to add implicit method to all dataframes | |
object ExtraDataFrameOperations { | |
object implicits { | |
implicit def dFWithExtraOperations(df: DataFrame) = DFWithExtraOperations(df) | |
} | |
} | |
// Add a custom method to drop a column from a dataframe | |
case class DFWithExtraOperations(df: DataFrame) { |
@ECHO OFF | |
::Select the id to start services | |
echo 1. Scala | |
echo 2. Spark-Shell | |
echo 3. Docker | |
echo 4. All | |
set x=0 | |
set /p id="Enter choice: " | |
IF %id%==1 ( |
import scala.util.Random | |
// Generate some sample data for two data sets | |
var states = scala.collection.mutable.Map[Int, String]() | |
var items = scala.collection.mutable.Map[Int, String]() | |
val rnd = new scala.util.Random(42) | |
// Initialize states and items purchased | |
states += (0 -> "AZ", 1 -> "CO", 2-> "CA", 3-> "TX", 4 -> "NY", 5-> "MI") | |
items += (0 -> "SKU-0", 1 -> "SKU-1", 2-> "SKU-2", 3-> "SKU-3", 4 -> "SKU-4", |
#set timezone in linux / wsl | |
sudo dpkg-reconfigure tzdata | |
git config --global alias.logline "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
git logline |