Skip to content

Instantly share code, notes, and snippets.

Avatar

mkol5222

  • Prague, Czech Republic
View GitHub Profile
@mkol5222
mkol5222 / chkp-shiftleft-docker-image-scanner.md
Last active Oct 7, 2020
How to scan Docker image with Check Point shiftleft container image scanner
View chkp-shiftleft-docker-image-scanner.md

How to scan Docker container image using Check Point shiftleft command-line scanner

Requirements

Have your CloudGuard Dome9 API keys ready. They are obtained from Dome 9 web UI at Settings / Credentials section

Env. variable Description
CHKP_CLOUDGUARD_ID your D9 API key identifier ("username")
CHKP_CLOUDGUARD_SECRET D9 API key secret ("password")
@mkol5222
mkol5222 / cveurl.sh
Created Jun 4, 2020
map CVE to JSON describing it. usage: curl -s $(./cveurl.sh "CVE-2017-0015") | jq -r .impact
View cveurl.sh
#!/bin/bash
cve2cveUrl () {
[[ $1 =~ CVE-([0-9]{4})-([0-9]+) ]]
#echo "${BASH_REMATCH[0]}"
#echo "${BASH_REMATCH[1]}"
#echo "${BASH_REMATCH[2]}"
cveUrl="https://raw.githubusercontent.com/aquasecurity/vuln-list/master/nvd/${BASH_REMATCH[1]}/$1.json"
}
View Docker first image.md

First Docker Image

Requirements

  • Docker Hub account, note your username your-usernamename
  • Docker installed on desktop - instructions

Reference

  • article Dockerizing a Node.js web app
  • repo mkol5222/nodeinfo
@mkol5222
mkol5222 / Run Visual Studio Code for Linux from WSL.md
Created Dec 6, 2018 — forked from fedme/Run Visual Studio Code for Linux from WSL.md
Run Visual Studio Code for Linux from WSL on Windows 10
View Run Visual Studio Code for Linux from WSL.md

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

@mkol5222
mkol5222 / puckLight.js
Created Nov 15, 2018 — forked from navio/puckLight.js
PuckJS - Light switch
View puckLight.js
const LEDS = [LED1,LED2,LED3];
const onBtnClick =
(fn)=> setWatch(fn, BTN, {edge:"rising", debounce:50, repeat:true});
const turnOn = (el) => {
el.write(true);
};
const turnOff = (el) => {
@mkol5222
mkol5222 / dbus_nm_ssid.py
Created Jul 13, 2018 — forked from hfs/dbus_nm_ssid.py
Query NetworkManager via DBUS in Python: Get the SSID of the active wireless connection
View dbus_nm_ssid.py
#!/usr/bin/env python
import dbus
NM = 'org.freedesktop.NetworkManager'
NMCA = NM + '.Connection.Active'
NMDW = NM + '.Device.Wireless'
NMAP = NM + '.AccessPoint'
DBUS_PROPS = 'org.freedesktop.DBus.Properties'
@mkol5222
mkol5222 / dbusnetwatch.go
Created Jul 13, 2018 — forked from wiless/dbusnetwatch.go
Monitor for change of SSID/Connection
View dbusnetwatch.go
package main
import (
"fmt"
"os"
"github.com/godbus/dbus"
)
// dbus-monitor --system "type='signal',sender='org.freedesktop.NetworkManager',interface='org.freedesktop.NetworkManager'"
@mkol5222
mkol5222 / setup.md
Created Jul 12, 2018 — forked from davidbradway/setup.md
Set Up Docker On Raspberry Pi Raspbian Stretch Lite
View setup.md
View grafana_setup.sh
#!/bin/bash
./run.sh "${@}" &
timeout 10 bash -c "until </dev/tcp/localhost/3000; do sleep 1; done"
curl -s -H "Content-Type: application/json" \
-XPOST http://admin:admin@localhost:3000/api/datasources \
-d @- <<EOF
{
"name": "influx",
View grafana_backup.sh
BASEURL=http://username:password@127.0.0.1:3000
for dash in $(curl -s -k "${BASEURL}/api/search" | jq -r '.[].title'); do
curl -k "${BASEURL}/api/dashboards/db/${dash}" > "${dash}.json"
done
You can’t perform that action at this time.