NOTE: Code blocks indicate input on prompt with a '$'. Everything else is output
$ /opt/kafka/bin/kafka-topics.sh --topic my_topic --zookeeper localhost:2181 --create --partitions 1 --replication-factor 1
Created topic "my_topic".
ProductID Database | |
106 GeoIP.dat | |
111 GeoIPOrg.dat | |
112/115 GeoIPRegion.dat | |
117 GeoIPASNum.dat | |
119 GeoIPUserType.dat | |
121/122 GeoIPISP.dat | |
132/133 GeoIPCity.dat | |
135 GeoIPAreaCode.dat | |
137 GeoIPDMACode.dat |
# Install epel | |
sudo yum -y install epel-release | |
# Install kernel headers for current kernel | |
sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r) | |
# Install ntop repos | |
cat << EOF | sudo tee /etc/yum.repos.d/ntop.repo | |
[ntop] | |
name=ntop packages |
Services declared as oneshot
are expected to take some action and exit immediatelly (thus, they are not really services,
no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.
Let's create a example foo
service that when started creates a file, and when stopped it deletes it.
Create executable file /opt/foo/setup-foo.sh
:
sudo sed -i'' 's/^# output unified2/output unified2/' /etc/snort/snort.conf | |
sudo sed -i'' 's/ALERTMODE/#ALERTMODE/' /etc/sysconfig/snort |
#!/bin/bash | |
curl --location https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b.dtb > /boot/bcm2710-rpi-3-b.dtb | |
curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.bin > /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin | |
curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.txt > /usr/lib/firmware/brcm/brcmfmac43430-sdio.txt | |
echo "Reboot to ensure the dtb is initialized and kernel knows about the hardware in place." | |
echo |
#!/usr/bin/env python2 | |
from multiprocessing import Pool | |
from time import sleep | |
from random import randint, gauss | |
import os, sys | |
import requests | |
## TODO | |
# . recursively download linked resources: | |
# . images |
function Get-DownloadedPEHashes | |
{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, Position=0)] | |
[String]$Path, | |
[Switch]$Recursive = $true | |
) | |
if (!$Path.EndsWith('\')) |
#!/usr/local/bin/jq -s -r -f | |
( map(keys) | add | unique ) as $cols | | |
map(. as $row | $cols | map($row[.])) as $rows | | |
$cols, $rows[] | @csv |
[Unit] | |
Description=Elasticsearch | |
Documentation=http://www.elastic.co | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Environment=ES_HOME=/usr/share/elasticsearch | |
Environment=CONF_DIR=/etc/elasticsearch | |
Environment=DATA_DIR=/var/lib/elasticsearch |