Skip to content

Instantly share code, notes, and snippets.

@mousavian
mousavian / k8s-cronjob-suspend.sh
Last active September 15, 2023 08:40
Suspending all cronjobs in all namespaces in kubernetes
#!/bin/bash
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do
for cj in $(kubectl get cronjobs -n "$ns" -o name); do
kubectl patch "$cj" -n "$ns" -p '{"spec" : {"suspend" : true }}';
done
done
@mousavian
mousavian / bare.sh
Created October 31, 2019 01:24
Removes passphrase from private key (Supports OpenSSH and RSA)
#!/bin/bash
# Usage:
# RSA:
# ./bare.sh my-priv-key -t rsa
#
# OpenSSH
# ./bare.sh my-priv-key -t openssh
#
@mousavian
mousavian / .vimrc
Last active December 18, 2019 01:37
" use filetype-based syntax highlighting, ftplugins, and indentation
syntax on
filetype plugin indent on
colorscheme challenger_deep
set number " show line numbers
set nowrap " nowrap lines
set encoding=utf-8 " set encoding to UTF-8 (default was "latin1")
" set mouse=a " enable mouse support (might not work well on Mac OS X)
@mousavian
mousavian / spacewalk-answers.txt
Created March 23, 2020 23:52
spacewalk-setup --external-oracle --answer-file=./spacewalk-answers.txt
admin-email =
ssl-set-org =
ssl-set-org-unit =
ssl-set-city =
ssl-set-state =
ssl-set-country =
ssl-password =
ssl-set-email =
ssl-config-sslvhost = N
db-backend=oracle
@mousavian
mousavian / twitter-blocker.js
Created November 10, 2022 08:29
Twitter Ato report using Tamperbmonkey
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==