Skip to content

Instantly share code, notes, and snippets.

Avatar

Brendan Weibrecht ZimbiX

View GitHub Profile
@ZimbiX
ZimbiX / kube-run-pod.sh
Last active Oct 20, 2021
A helper script for running a one-shot pod, typically as part of a deployment pipeline - e.g. to carry out a database migration. Developed in collaboration with @ceralena
View kube-run-pod.sh
#!/bin/bash
##################################################
# kube-run-pod
#
# This is a helper script for running a one-shot pod, typically as part of a
# deployment pipeline - e.g. to carry out a database migration.
#
# All arguments are required.
#
View apt install kali-linux-full - after apt update
kali@kali:~$ sudo apt install kali-linux-full
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
0trace ace-voip afflib-tools aglfn amap apache-users arj arp-scan arping arpwatch asleap aspell
aspell-en automater autopsy avahi-daemon backdoor-factory bbqsql bdfproxy bed bind9-host binutils
binutils-aarch64-linux-gnu binutils-common binwalk blindelephant bluelog blueranger bluesnarfer
bluez-hcidump braa btscanner build-essential bully busybox cabextract cadaver cdpsnarf cewl cgpt
cherrytree chirp chkrootkit chntpw cisco-auditing-tool cisco-global-exploiter cisco-ocs cisco-torch
clang clang-7 clusterd commix console-setup console-setup-linux cowpatty cpp-8 cramfsswap creddump
@ZimbiX
ZimbiX / tf-dd-prov-imp2tf.py
Last active Apr 9, 2018 — forked from htnosm/tf-dd-prov-imp2tf.py
Convert tfstate to tf for datadog_monitor on Terraform Datadog Provider
View tf-dd-prov-imp2tf.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import sys
import codecs
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
f = open('terraform.tfstate', 'r')
data = json.load(f)
@ZimbiX
ZimbiX / fix_pacman_duplicated_database_entry_errors.py
Created Apr 13, 2017
Fix Pacman "error: duplicated database entry '<package>'" for Arch Linux
View fix_pacman_duplicated_database_entry_errors.py
#!/usr/bin/env python
import os,re, datetime
d = '/var/lib/pacman/local'
packages = os.listdir(d)
packages.sort()
packages.remove('ALPM_DB_VERSION')
pkgname_search = re.compile('^(.*?)-[0-9]')
@ZimbiX
ZimbiX / gist:ef05e08ee76a83de58ecde5749c8ff46
Last active Apr 20, 2016
CrashPlan just killed my server too
View gist:ef05e08ee76a83de58ecde5749c8ff46
$ cd /opt/crashplan/upgrade
$ du -h .
175G .
$ ls -alF
total 129724
d--------- 4185 root root 245760 Apr 21 01:20 ./
drwxr-xr-x 12 root root 4096 Apr 21 02:47 ../
drwxr-xr-x 4 root root 4096 Jan 15 20:47 1435726800452_78.1452851262498/
View bigger-is-greater_v14.rb
#!/usr/bin/env ruby
# ehxxdsuhoowxpbxiwxjrhe # Input
# ehxxdsuhoowxpbxiwxrehj # Expected
# ehxxdsuhoowxpbxiwxehj
# ehxxdsuhoowxpebhijrwxx # v2 output (jump, sort)
# behijrwxx # Sorted chars
# 123456788 # Numerals for testing
# 184785632 # Input
# 184786235 # Expected
View battery_rate.sh
#!/bin/sh
#
# Returns the number of Watts at which the battery is charging or discharging, to one decimal place
rate=`upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'energy-rate:[ ]*[0-9\.]* W' | grep -o '[0-9\.]*'`
printf "%0.1f\n" $rate
View keybase.md

Keybase proof

I hereby claim:

  • I am ZimbiX on github.
  • I am brendanweibrecht (https://keybase.io/brendanweibrecht) on keybase.
  • I have a public key whose fingerprint is CECB DA78 FF06 B0B4 AF9D 46FB 1ADA 2FE4 C45C 3E16

To claim this, I am signing this object: