Skip to content

Instantly share code, notes, and snippets.

View hiranp's full-sized avatar
💭
Don't Panic... working on it!

HP hiranp

💭
Don't Panic... working on it!
View GitHub Profile
@hiranp
hiranp / pyav_streamlink_youtube_live.py
Created July 6, 2024 17:40 — forked from mikaelhg/pyav_streamlink_youtube_live.py
Using PyAV and Streamlink to decode Youtube Live HLS streams
@hiranp
hiranp / Script_Template.ps1
Created May 9, 2023 16:35 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
#requires -version 2
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
@hiranp
hiranp / gist:6307358f939435f1c0bd1bd3b8eea5e5
Created May 6, 2023 20:41 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hiranp
hiranp / newcert.py
Created February 21, 2023 16:21 — forked from Zeerg/newcert.py
Python script to generate CSR/Self Signed Cert. Needs pyOpenssl and python-whois
#!/usr/bin/python
from OpenSSL import crypto
import os
import sys
import datetime
import whois
#Variables
TYPE_RSA = crypto.TYPE_RSA
TYPE_DSA = crypto.TYPE_DSA
@hiranp
hiranp / kbhit.py
Created October 20, 2022 14:07 — forked from michelbl/kbhit.py
#!/usr/bin/env python
'''
A Python class implementing KBHIT, the standard keyboard-interrupt poller.
Works transparently on Windows and Posix (Linux, Mac OS X). Doesn't work
with IDLE.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

“Fools ignore complexity; pragmatists suffer it; experts avoid it; geniuses remove it.”

– Alan Perlis (Turing Award #1, ALGOL)


“Computer Science is the first engineering discipline in which the complexity of the objects created is limited solely by the skill of the creator, and not by the strength of raw materials.”

@hiranp
hiranp / lima-on-m1-mac-installation-guide.md
Created May 3, 2022 21:14 — forked from toricls/lima-on-m1-mac-installation-guide.md
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@hiranp
hiranp / prepare-commit-msg
Created March 7, 2022 18:11 — forked from raduchiriac/prepare-commit-msg
Hook: Prepend Jira ticket ID to the git commit message
#!/bin/bash
# Get the current branch name
current_branch=`git rev-parse --abbrev-ref HEAD`
# Search Jira ID in a pattern such a "feature/ABCD-123-my-feature"
id=$(echo $current_branch | sed -nE 's,[a-z]+/([A-Z]+-[0-9]+)-.+,\1,p')
# only prepare commit message if pattern matched and jiraId was found
if [[ ! -z $id ]]; then
@hiranp
hiranp / vmware-ec2.md
Created January 17, 2022 20:49 — forked from phpdude/vmware-ec2.md
Exporting VMWare images (OVA) from EC2

How to provision VMWare compatible .ova images on EC2

EC2 only lets you export instances as VMWare-compatible OVA files if you originally imported that instance from an OVA. Presumably it preserves the metadata and XML gubbins for the instance, and just wraps it up again using that metadata on export.

In order to provision arbitrary VMs in an OVA-exportable way, we abuse the volume snapshots on one VM.

Prep work:

  • Make a fresh install of ubuntu server or whatever your base distro is, in VMWare, export as OVA file. (single disk only!)
  • Untar the OVA and import the VMDK file into ec2 using ec2-instance-import onto an HVM instance type (ie, no xen kernel needed)
@hiranp
hiranp / Minikube for Mac Users.md
Created September 2, 2021 03:29 — forked from protosam/Minikube for Mac Users.md
Notes for switching from Docker Desktop to Minikube

With Docker Desktop becoming more restricted, I've decided to move on to just using minikube. In doing so, I've consolidated my notes as follows.

Installation

Use brew to install the docker cli and minikube.

$ brew install minikube docker kubectl hyperkit

Running Minikube

The first time you start minikube, you should specify any settings you desire.