Skip to content

Instantly share code, notes, and snippets.

View mukunda-'s full-sized avatar

Mukunda Johnson mukunda-

View GitHub Profile
@ddomen
ddomen / npm_windows_fix.js
Last active January 25, 2024 13:57
File for fix npm windows problems (related to error Unexpected token '.' when trying to run 'npm install')
/**
* Copyright (c) 2022 ddomen (Daniele Domenichelli <[email protected]>)
*
* 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
@bmatthewshea
bmatthewshea / certbot_pip_install-debian_ubuntu.md
Last active January 21, 2025 17:22
Debian/Ubuntu - CERTBOT without SNAP/SNAPD

CERTBOT - Install using Python PIP

Install Certbot using Python PIP (Package Installer for Python) - without using SNAP, APT or SYSTEMD. (Debian/Ubuntu)


This guide will help you install LetsEncrypt / Certbot using venv PIP under Debian/Ubuntu.

  • This guide has been tested up to Debian 12 / Bookworm.
@3j14
3j14 / watchscp.sh
Created June 28, 2020 13:08
Watch files and upload via scp
#!/bin/bash
UPLOAD=$1
fswatch -0 . | xargs -0 -I {} sh -c 'p="{}"; f="${p/$(pwd)\/}"; scp $p '"$UPLOAD"'"${f}"'
@mihow
mihow / load_dotenv.sh
Last active April 25, 2025 17:10
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
#!/bin/bash
#Heavily inspired by clivewalkden/centos-7-package.sh
# ( https://gist.github.com/clivewalkden/b4df0074fc3a84f5bc0a39dc4b344c57 )
#However, this one was tested... 2017-JAN-09
vagrant init centos/7
vagrant up
vagrant ssh -c "sudo yum -y update"
vagrant ssh -c "sudo yum -y install wget nano kernel-devel gcc"
@eXenon
eXenon / ssl.py
Last active December 4, 2021 18:57
Quick SSL Packet Parser / Builder
# Constants - taken from dpkt/ssl.py
import struct
# SSLv3/TLS versions
SSL3_V = 0x0300
TLS1_V = 0x0301
TLS11_V = 0x0302
TLS12_V = 0x0303
@sverhoeven
sverhoeven / README.md
Created June 24, 2014 10:23
azure ad as idp + simplesamlphp as sp

Create sp in simplesamlphp

  1. Add SP to authsources.php

     'default-sp' => array(
             'saml:SP',
             'entityID' => 'https://svwiki.cloudapp.net',
             'discoURL' => NULL,
             'privatekey' => 'saml.pem',
    

'certificate' => 'saml.crt',

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 8, 2025 09:19
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@Jaliborc
Jaliborc / Upload to Curse.py
Created January 6, 2012 18:59
This is a simple script that will upload your zipfile to CurseForge. Also works on WoWAce.
import requests
headers = {
'User-Agent': 'CurseForge Uploader Script/1.0',
'X-API-Key': YOUR_KEY
}
files = {'file': ('MyFile.zip', open('MyFile.zip', 'r'))}
data = {
'name': 'Version Banana',