Skip to content

Instantly share code, notes, and snippets.

View mavwolverine's full-sized avatar

Viraj Kanwade mavwolverine

View GitHub Profile
@mavwolverine
mavwolverine / aws_mfa_creds.sh
Last active August 12, 2020 17:54
AWS CLI with MFA
#!/bin/bash
# source ./aws_mfa_creds.sh <MFA KEY> <ORIG AWS PROFILE NAME - optional, default>
# https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/
# Works on MacOS. Might need changes to date command params for linux
if [ -n "$AWS_SESSION_TOKEN_EXPIRATION" ]
then
if [ $(date -jf "%Y-%m-%dT%H:%M:%SZ" "$AWS_SESSION_TOKEN_EXPIRATION" +"%s") -gt $(date +"%s") ]
showthread.php/1507523-Bhagya-Dile-Tu-Mala-10th-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 10th October 2022 Video Watch Online
showthread.php/1507162-Bhagya-Dile-Tu-Mala-7th-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 7th October 2022 Video Watch Online
showthread.php/1506991-Bhagya-Dile-Tu-Mala-6th-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 6th October 2022 Video Watch Online
showthread.php/1506806-Bhagya-Dile-Tu-Mala-5th-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 5th October 2022 Video Watch Online
showthread.php/1506614-Bhagya-Dile-Tu-Mala-4th-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 4th October 2022 Video Watch Online
showthread.php/1506428-Bhagya-Dile-Tu-Mala-3rd-October-2022-Video-Watch-Online?highlight=bhagya+dile+mala,Bhagya Dile Tu Mala 3rd October 2022 Video Watch Online
showthread.php/1506206-Bhagya-Dile-Tu-Mala-1st-Oct
@mavwolverine
mavwolverine / aws-key-pair-private.sh
Created July 19, 2024 04:23
get private key from AWS key pair
KEY_PAIR_NAME="XYZ"; aws ssm get-parameter --name /ec2/keypair/$(aws ec2 describe-key-pairs --filters "Name=key-name,Values=$KEY_PAIR_NAME" --query "KeyPairs[*].KeyPairId" --output text) --with-decryption --query "Parameter.Value" --output text
@mavwolverine
mavwolverine / next+14.2.30.patch
Created July 20, 2025 03:02
Access logs in Next.js production build
diff --git a/node_modules/next/dist/server/lib/start-server.js b/node_modules/next/dist/server/lib/start-server.js
index ed79818..b41b07c 100644
--- a/node_modules/next/dist/server/lib/start-server.js
+++ b/node_modules/next/dist/server/lib/start-server.js
@@ -39,6 +39,14 @@ const _appinfolog = require("./app-info-log");
const _turbopackwarning = require("../../lib/turbopack-warning");
const _trace = require("../../trace");
const _ispostpone = require("./router-utils/is-postpone");
+require('pino-http-print');
+const _logger = require('pino-http')(
@mavwolverine
mavwolverine / next+14.2.30.patch
Created July 20, 2025 17:58
Next.js standalone app server.js hostname setup from env NEXT_HOSTNAME
diff --git a/node_modules/next/dist/build/utils.js b/node_modules/next/dist/build/utils.js
index ce30a5f..24c6f23 100644
--- a/node_modules/next/dist/build/utils.js
+++ b/node_modules/next/dist/build/utils.js
@@ -1487,8 +1487,8 @@ const dir = path.join(__dirname)
process.env.NODE_ENV = 'production'
process.chdir(__dirname)
-const currentPort = parseInt(process.env.PORT, 10) || 3000
-const hostname = process.env.HOSTNAME || '0.0.0.0'
@mavwolverine
mavwolverine / Dockerfile
Last active July 20, 2025 23:22
next.js runtime assetPrefix
# This is snippet of next.js build Dockerfile
...
# placeholder hack for replacement at startup
ENV NEXT_PUBLIC_CDN_DOMAIN=http://MY_CDN_DOMAIN_REPLACE_ME
ENV NEXT_PUBLIC_BASE_PATH=/MY_BASE_PATH_REPLACE_ME
...
@mavwolverine
mavwolverine / .claude settings.json
Last active May 6, 2026 06:23
claude status line for showing context usage to avoid auto compact surprises
{
"statusLine": {
"type": "command",
"command": "/bin/sh ~/.claude/scripts/statusline-command.sh"
}
}