Skip to content

Instantly share code, notes, and snippets.

View shubhamsre's full-sized avatar
🎯
Focusing

Shubh shubhamsre

🎯
Focusing
View GitHub Profile
import pyttsx3
import speech_recognition as sr
import webbrowser
import pywhatkit
import wikipedia
import os
import datetime
from playsound import playsound
import keyboard
import pyjokes
@alexellis
alexellis / kvm_minikube.md
Last active July 26, 2024 01:47
Run multiple minikube Kubernetes clusters on Ubuntu Linux with KVM

Ramp up your Kubernetes development, CI-tooling or testing workflow by running multiple Kubernetes clusters on Ubuntu Linux with KVM and minikube.

In this tutorial we will combine the popular minikube tool with Linux's Kernel-based Virtual Machine (KVM) support. It is a great way to re-purpose an old machine that you found on eBay or have gathering gust under your desk. An Intel NUC would also make a great host for this tutorial if you want to buy some new hardware. Another popular angle is to use a bare metal host in the cloud and I've provided some details on that below.

We'll set up all the tooling so that you can build one or many single-node Kubernetes clusters and then deploy applications to them such as OpenFaaS using familiar tooling like helm. I'll then show you how to access the Kubernetes clusters from a remote machine such as your laptop.

Pre-reqs

  • This tutorial uses Ubuntu 16.04 as a base installation, but other distributions are supported by KVM. You'll need to find out how to install
@greglook
greglook / sg-diff
Created July 27, 2018 23:11
Render Terraform AWS security group diffs for humans
#!/usr/bin/env ruby
# Better Terraform security group diffing. Feed the terraform resource diff
# output into this script's standard input.
SGR_ANSI = "\e[%sm"
SGR_CODES = {
none: 0,
bold: 1,
@kvudata
kvudata / label-ns.yaml
Created June 27, 2018 20:20
Use Helm hook to add labels to a namespace before chart installation
# This hook depends on helm creating the target namespace if it doesn't exist
# before the hook is called. This is the case on Helm v2.9.1
apiVersion: batch/v1
kind: Job
metadata:
name: label-ns
namespace: kube-system
labels:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
@matijs
matijs / README.md
Last active June 24, 2024 23:41
Solarized Dark profile for macOS Terminal.app

Solarized Dark profile for Terminal.app on macOS High Sierra

Based on the excellent Solarized (Dark) created by Ethan Schoonover. For source code, check the main Solarized repository on GitHub.

Installation

Open and save Solarized Dark.terminal.

Import from the “Profiles” tab in the settings of Terminal.app or just double-click the file after downloading.

@krist00fer
krist00fer / Get-AzureUsageCost.ps1
Last active May 8, 2024 16:39
PowerShell Script to retrieve Azure Usage and Cost/Pricing
# Licensed under the MIT license.
# Copyright (C) 2017 Kristofer Liljeblad
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#!/bin/bash
# variables
LOGFILE="/var/log/nginx/access.log"
LOGFILE_GZ="/var/log/nginx/access.log.*"
RESPONSE_CODE="200"
# functions
filters(){
grep $RESPONSE_CODE \
@kocisov
kocisov / next_nginx.md
Last active August 2, 2024 13:02
How to setup next.js app on nginx with letsencrypt
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc