Skip to content

Instantly share code, notes, and snippets.

@seanmceligot
seanmceligot / airthings_radon.py
Created July 18, 2023 01:25
airthings CSV export monthly radio averages
import argparse
import sys
from typing import List
import polars as pl
from icecream import ic
def report(input_csvs: List[str], output_csv: str):
# out.csv sample
@seanmceligot
seanmceligot / install_jenkins_plugin.sh
Created December 10, 2018 19:46 — forked from hoesler/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/usr/bin/env bash
set -e
set -o pipefail
plugin_repo_url="http://updates.jenkins-ci.org/download/plugins"
plugin_dir="/var/lib/jenkins/plugins"
include_optionals=false
showUsage() {
@seanmceligot
seanmceligot / strace.sh
Created July 26, 2017 01:42
use strace to see what files are opened by a command
[sean@arch ansible]$ strace date 2>&1 | grep open
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
[sean@arch ansible]$ strace touch foo 2>&1 | grep open
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
@seanmceligot
seanmceligot / restore.sh
Created July 26, 2017 01:27
restore git repo from tarred .git folder (or gitlab bundle)
# for a bundle of tars
> file *.bundle
first.bundle: POSIX tar archive (GNU)
second.bundle: POSIX tar archive (GNU)
## for s single file
mkdir -p reponame/.git;
tar xvf dotgit.tar -C reponame/.git;
cd reponame
@seanmceligot
seanmceligot / metasploit-heartblead.sh
Created July 22, 2017 01:22
safe metasploit testing with docker
# start vulnerable system
[sean@arch docker]$ docker run -d -p 443:443 simonswine/wheezy-with-heartbleed
# start postgresql for metasploit
[sean@arch docker]$ docker run -d --name=postgres postgres
[sean@arch docker]$ docker run -it --link postgres:db pandrew/metasploit
CREATE DATABASE
[*] Starting the Metasploit Framework console.../[*] The initial module cache will be built in the background, this can take 2-5 minutes...
\
, ,
/ \