Skip to content

Instantly share code, notes, and snippets.

View junkblocker's full-sized avatar

Manpreet Singh junkblocker

View GitHub Profile
# This tells kubecfg to read its config from the local directory
export KUBECONFIG=./kubeconfig
# Looking at the cluster
kubectl get nodes
kubectl get pods --namespace=kube-system
# Running a single pod
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard
kubectl get pods
#!/bin/bash
echo "Please wait..."
# Look for suspect files
/usr/bin/find -E {,~}/Applications -iregex '.*\.app\/(.*\.DS_Store|Icon.{1})$' > /tmp/.suspectfiles
# Check suspect files
appsCounter=0
while read path; do
#! /bin/sh
### BEGIN INIT INFO
# Provides: mydaemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mydaemon does stuff
# Description: this is an actual executable script, and should be saved in
# /etc/init.d/mydaemon.
#!/usr/bin/python3
"""
Usage:
plasmasetconfig # List all widget namespaces
plasmasetconfig org.kde.plasma.digitalclock # List all config groups+keys
plasmasetconfig org.kde.plasma.digitalclock Appearance showSeconds true
Install:
chmod +x ~/Downloads/plasmasetconfig.py
sudo cp ~/Downloads/plasmasetconfig.py /usr/local/bin/plasmasetconfig
Uninstall:
local config = {}
local wezterm = require "wezterm"
local math = require "math"
local os = require "os"
math.randomseed(os.time())
config.unix_domains = {
{
name = "unix",
#!/usr/bin/env python3
import json
import os
import os.path
import shutil
import sys
import tarfile
import tempfile
import typing
import xml.etree.ElementTree as ET
@junkblocker
junkblocker / notify-desktop
Last active March 23, 2022 03:31 — forked from digitaltrails/notify-desktop
notify-desktop - linux find and notify desktop session
#!/usr/bin/env bash
# Provides a way for a root process to perform a notify send for each
# of the local desktop users on this machine.
#
# Intended for use by cron and timer jobs. Arguments are passed straight
# to notify send. Falls back to using wall. Care must be taken to
# avoid using this script in any potential fast loops.
#
# X11 users should already have a dbus address socket at /run/user/<userid>/bus
# and this script should work without requiring any initialisation. Should
@junkblocker
junkblocker / ARCHANONIRC.md
Created March 23, 2016 18:16 — forked from zotherstupidguy/ARCHANONIRC.md
A Quick Guide for Anonymous and Pseudonymous irc

##Weechat+Arch Linux+Tor ###A Quick Guide for Anonymous and Pseudonymous irc I'm going to assume you know what irc is, and generally how it works. If you haven't gotten that far watch a youtube video and try out some of the commands on an irc webclient somewhere. On Arch Linux to install Weechat you can run sudo pacman -S weechat or you can download it from the official website at http://weechat.net/download/.

You can also install Tor from the official repositories, but If you are going to be making multiple connections to irc networks and you want to keep your identities seperate, I would recommend installing the Tor Browser Bundle as well. This should be done from the Tor website, and you should check the GnuPG signature on the package before running it. The key they have been using to sign the packages with for the months that I have been verifying it i

@junkblocker
junkblocker / btrfs-undelete
Created November 8, 2022 15:21 — forked from Changaco/btrfs-undelete
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@junkblocker
junkblocker / download_zeal_user_docsets.py
Last active June 2, 2023 00:19 — forked from fleury08/download_zeal_user_docsets.py
Interactively download user contributed docsets and cheatsheets for Zeal
#!/usr/bin/env python3
"""Download Dash User Docsets and install them in Zeal"""
import configparser
import json
import tarfile
import urllib.request
from pathlib import Path
from sys import platform
from typing import Any, Dict, List