Skip to content

Instantly share code, notes, and snippets.

View pr0PM's full-sized avatar
💤
still sleepy

Prateek Mishra pr0PM

💤
still sleepy
View GitHub Profile
@pr0PM
pr0PM / snippet.json
Created March 10, 2023 17:29
bash snippets
{
// Place your snippets for shellscript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"shebang": {
"prefix": "shebang bash",
"body": [
"#!/bin/bash",
@pr0PM
pr0PM / palo alto global protect vpn
Created January 9, 2023 08:01
script to start/stop palo alto vpn since reconnecting takes longer and is slower if done from menu bar icon
#!/bin/bash
# todo: original credits
function setup() {
sudo mv /Library/LaunchDaemons/com.paloaltonetworks.gp.pangpsd.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/
}
@pr0PM
pr0PM / slack_status.sh
Last active January 10, 2023 16:43
update slack status from cli
#!/bin/bash
set -euo pipefail
token="xoxp-yourtoken-goes-here-r4nd0m37r1ng"
# Instructions
# copy this anywhere, chmod +x path.sh
# set an alias on your fav shell rc
# eg: I moved it to ".local/bin/st" and now I can call it anywhere using just `st`
# ./local/bin being in my path
# dependency (to make stuf pretty) :
{
"basics": {
"name": "Prateek Mishra",
"label": "the cloud guy",
"image": "",
"email": "pr0pm@pm.me",
"phone": "+91 89xxxxxxx",
"url": "https://pr0pm.in",
"summary": "Trust me I'm a cloud engineer!",
"location": {
@pr0PM
pr0PM / ydl-mpv-audio.sh
Last active December 11, 2022 14:52
Find and stream the song you wish to listen directly from terminal ft. bash
#!/usr/bin/env bash
set -euo pipefail
# dependencies:
## mpv
## youtube-dl
mpv --player-operation-mode=pseudo-gui "$(yt-dlp "ytsearch: $*" -g | sed -n '2p')" &
# sed -n '2p'
# to select the second line of output from the search results of
@pr0PM
pr0PM / writeup.md
Last active February 21, 2021 10:54

DarkCON Post CTF writeup

Intro

The DarkCON CTF was the 3rd CTF by DarkArmy within last 12 months we hope you enjoyed this. Preparations for CTF began from December till lasting till the 18th of Jan and everything went as per schedule (learning from past mistakes).

Now let's keep it short.

Statistics

@pr0PM
pr0PM / bash
Created February 3, 2021 15:48
cassandra on podman
# remember to use :Z at the end while creating volumes to let podman disable and manage selinux
# flags and avoid getting the Permission Denied errors
podman create network cass-n
podman run --name learn-c --network cass-n -v ./data:/var/lib/cassandra:Z -d cassandra
@pr0PM
pr0PM / gpg-verify.sh
Last active September 28, 2020 05:45
DarkCTF
# DarkCTF (ctf.darkarmy.xyz)
# Chall Name: P_g_G_i_P_t
# Author: pr0PM
# To verify the signature the most common way is using:
# gpg --verify <detached file> <file-to-check-against>
# The bruteforce + hashcat is innovative but that wasted a lot of your time
# Here is the intended solution
# Guess why the filenames were still a number not some random string :)
@pr0PM
pr0PM / keybase.md
Created June 27, 2019 15:34
Hence I prove my online identity......

Keybase proof

I hereby claim:

  • I am pr0pm on github.
  • I am pr0pm (https://keybase.io/pr0pm) on keybase.
  • I have a public key ASBRoXnFqd1krnMczr7mnrg_PmlQxVOYM-RZ46gmK69YTAo

To claim this, I am signing this object: