Skip to content

Instantly share code, notes, and snippets.

View knbknb's full-sized avatar
💭
🙅‍♀️💡💤😴🛌🤪🧔

Knut Behrends knbknb

💭
🙅‍♀️💡💤😴🛌🤪🧔
  • Nothing to see here
  • Potsdam, Germany
View GitHub Profile
@knbknb
knbknb / command-line-piping.R
Last active August 3, 2025 16:39 — forked from chasemc/skimr.r
R: data.table fread with Unix Cmdtool
# see: https://www.youtube.com/watch?v=RYhwZW6ofbI&t=6s
# R tip #3: use pipe connections
# by jim Hester
library(data.table) # for files < ~10GB
library(skimr) # another summary()
# filter a file: get only lines containing word UNK
@knbknb
knbknb / parsnip_speedup.R
Last active August 3, 2025 16:36 — forked from simonpcouch/parsnip_speedup.R
R: Parsnip Speedup Example
# benchmarking the new parsnip release 1.0.3 vs previous 1.0.2
#
# forked from: @simonpcouch
# https://gist.github.com/simonpcouch/651d0ea4d968b455ded8194578dabf52
# gist name:simonpcouch/parsnip_speedup.R
# 2022-11-22
#
library(tidymodels)
# with v1.0.2 ------------------------------------------------------------
@knbknb
knbknb / ubuntu-custom-setup.sh
Last active August 3, 2025 16:36 — forked from riccardopedrielli/ubuntu-workstation-setup.sh
ubuntu: Workstation Setup Scripts
#!/usr/bin/env bash
set -Eeu
trap 'STATUS=${?}; echo "${0}: Error on line ${LINENO}: ${BASH_COMMAND}"; exit ${STATUS}' ERR
trap 'rm -rf ${tempDir}' EXIT
readonly supportedUbuntuVersion="22.04"
readonly tempDir="/tmp/setup"
readonly devDir="${HOME}/dev"
readonly scriptsDir="${devDir}/scripts"
@knbknb
knbknb / cleanup-gitlab-pipelines.sh
Created February 20, 2023 17:18 — forked from chrishoerl/cleanup-gitlab-pipelines.sh
gitlab: Bulk Delete Pipelines by Date
#!/bin/bash
# Purpose: Bulk-delete GitLab pipelines older than a given date
# Author: github.com/chrishoerl
# GitLab API: v4
# Requirements: jq must be instaled ($ sudo apt install jq)
# API example: https://gitlab.example.com/api/v4/projects
# API example: https://gitlab.example.com/api/v4/projects/<projectid>/pipelines
#
# NOTE: Script is just a dryrun. To really delete pipelines, simply uncomment line 49 to activate
#
@knbknb
knbknb / ultimate-ut-cheat-sheet.md
Last active August 21, 2024 07:20 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@knbknb
knbknb / hat.rkt
Created May 16, 2024 08:15 — forked from rdivyanshu/hat.rkt
racket: Hat Tiling Example
#lang racket
(require metapict)
(require metapict/pict)
(struct M-edge (turn) #:transparent)
(struct X+ M-edge () #:transparent)
(struct X- M-edge () #:transparent)
(struct A+ M-edge () #:transparent)