Skip to content

Instantly share code, notes, and snippets.

@Studentenfutter
Studentenfutter / dashboard.css
Created October 12, 2023 12:16 — forked from thibodux/dashboard.css
Splunk CSS: Hide options / time ranges from time pickers
/* These CSS settings will hide often unwanted time
period options from all time pickers in SimpleXML
dashboards for the app containing this file.
These settings are only visual changes, i.e.,
users can still search using All-Time or Real-Time
settings if they know how to manually enter the
corresponding values */
/* ACCORDION MENUS*/
#! /bin/bash
# Adopted from the great DetectionLab
# This will install Splunk + BOTSv2 Attack only dataset
install_prerequisites() {
echo "[$(date +%H:%M:%S)]: Downloading DetectionLab..."
# Clone DetectionLab for Splunk Apps
git clone https://github.com/clong/DetectionLab.git /opt/DetectionLab
}
@Studentenfutter
Studentenfutter / get_points.r
Created July 8, 2021 11:36 — forked from briatte/get_points.r
R: Create tibbles from Points and Polygons in a Google Maps KML file – not particularly efficient code, but should do the trick; answer to http://stackoverflow.com/q/19497652/635806
#' Read Points out of a KML file.
#'
#' @param x A KML file exported from Google Maps.
#' @param layer The name of the layer to extract from: defaults to \code{"d1"}.
#' @param verbose Whether to report invalid coordinates and/or altitudes below
#' sea level; defaults to \code{TRUE}. See \link{kml_coordinate}.
#' @return A \link[tibble:tibble]{tibble} containing the \code{name},
#' \code{description}, \code{styleUrl} and Point coordinates (\code{longitude},
#' \code{latitude} and \code{altitude}) of each Placemark element contained in
#' the KML file. Placemark elements with no Point coordinates, such as Polygon
@Studentenfutter
Studentenfutter / sentiws.R
Last active March 5, 2022 13:59 — forked from PolMine/sentiws.R
Import SentiWS dictionary for sentiment analysis into R as data.table
# The get_sentiws function will download the zip-file with the SentiWS dictionary,
# unzip it and return a data.table.
library(data.table)
get_sentiws <- function(){
sentiws_tmp_dir <- file.path(tempdir(), "sentiws")
if (!file.exists(sentiws_tmp_dir)) dir.create(sentiws_tmp_dir)
sentiws_zipfile <- file.path(sentiws_tmp_dir, "SentiWS_v2.0c.zip")
sentiws_url <- "http://pcai056.informatik.uni-leipzig.de/downloads/etc/SentiWS/SentiWS_v2.0.zip"