Skip to content

Instantly share code, notes, and snippets.

@Studentenfutter
Studentenfutter / keybase.md
Created March 30, 2015 09:51
Keybase.io verification

Keybase proof

I hereby claim:

  • I am Studentenfutter on github.
  • I am aktiv (https://keybase.io/aktiv) on keybase.
  • I have a public key whose fingerprint is 3AAB 6706 7CA5 8ACC B32E B4B1 6896 7747 A112 314D

To claim this, I am signing this object:

@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"
@Studentenfutter
Studentenfutter / yolov5-to-coral-tpu.ipynb
Last active June 29, 2021 07:10
yolov5-to-coral-tpu
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
#! /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 / download_latest_splunk.sh
Last active August 25, 2024 07:31
Bash script to download and extract the latest Splunk Enterprise Version - No login needed
#!/bin/bash
echo -e "\033[31m###### This script will try to auto-resolve the Splunk Enterprise download URL and exract Splunk to a folder of your choice #####\033[0m"
echo -e "\033[33m[$(date +%H:%M:%S)]: Attempting to autoresolve the latest version of Splunk...\033[0m"
LATEST_SPLUNK=$(curl https://www.splunk.com/en_us/download/splunk-enterprise.html | grep -i Linux-x86_64.tgz | grep -Eo "data-link=\"................................................................................................................................" | cut -d '"' -f 2)
SPLUNK_MD5=$(curl https://www.splunk.com/en_us/download/splunk-enterprise.html | grep -i Linux-x86_64.tgz | grep -Eo "data-md5=\"................................................................................................................................" | cut -d '"' -f 2)
# Sanity check what was returned from the auto-parse attempt
if [[ "$(echo $LATEST_SPLUNK | grep -c "^https:")" -eq 1 ]] && [[ "$(echo $LATEST_SPLUNK | grep -c "\.tgz$")" -eq 1 ]]; then
@Studentenfutter
Studentenfutter / decrypt_pdf.sh
Created July 31, 2023 11:48
Extract text from copy protected PDFs with qpdf
#!/bin/bash
# Function to decrypt and rename a PDF file
decrypt_and_rename() {
input_file="$1"
output_file="${input_file%.pdf}_decrypted.pdf"
qpdf --decrypt "$input_file" "$output_file"
}
# Prompt the user to enter the folder path
@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*/