Skip to content

Instantly share code, notes, and snippets.

shaardie / main.cpp
Created Oct 19, 2020
C++ Interface Example for mocking Hardware
View main.cpp
#include <iostream>
using namespace std;
* @brief Base Class
class Interface
shaardie / gsad.service
Last active Feb 10, 2020
OpenVAS Systemd Service files
View gsad.service
Description=OpenVAS - Greenbone Security Assistant
ExecStart=/usr/local/sbin/gsad --foreground
shaardie /
Last active Mar 16, 2017
Simple python system logger example
import logging
import logging.handlers
handler = logging.handlers.SysLogHandler(address='/dev/log')
logger = logging.getLogger('')
shaardie / run
Last active Nov 11, 2016
Create a rpi3 debian imge
View run
set -x
set -u
set -e
apt-get update
apt -y install debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git ca-certificates curl psmisc build-essential bc dbus
dpkg --add-architecture armhf
shaardie /
Created Oct 30, 2016
Run external python function "run" mostly secure
#!/usr/bin/env python3
import os
import sys
import pwd
import grp
from importlib.machinery import SourceFileLoader
def secure(directory, user='nobody', group='nogroup'):