Skip to content

Instantly share code, notes, and snippets.

View rririanto's full-sized avatar
🏠
Working from home

Rahmat Ramadhan rririanto

🏠
Working from home
View GitHub Profile
@rririanto
rririanto / contagious-interview-scan-prompt.md
Last active November 21, 2026 14:23
Prompt Read-Only AI Agent Security Scan — Detect Trojanized .git Filters & "Contagious Interview" Malware

Want to Check Your Own Machine? Copy-Paste This AI Agent Scan Prompt

If you’ve recently unzipped a coding test or cloned a sketchy repo and want to check your machine safely, you can paste this read-only prompt into your AI coding agent (Antigravity, Claude Code, Codex, Cursor, etc.):

Perform a strictly READ-ONLY security triage scan of my machine for signs of a "Contagious Interview" / trojanized-repo compromise (Git clean-filter RCE, hidden local Node stagers, persistence, or off-screen JS loaders).

IMPORTANT SAFETY RULES:
- Do NOT execute, open in an IDE, or run `git status` / `npm install` inside any untrusted repository.
- Do NOT delete or modify any files yet—only inspect and report findings.
@rririanto
rririanto / jq_large_remove.sh
Last active March 27, 2022 14:43
Using Jq on large json file (10GB), remove one key from json large file
jq -n --stream 'fromstream(inputs|select((length == 2 and .[0][1] == "_id")|not))' users_large.json > users.json
@rririanto
rririanto / Mongoimport.sh
Created March 26, 2022 18:38
Mongoimport with clean _id
mongoimport --collection users --file users.json --jsonArray --uri $MONGO_URI_NEW
mongoimport --collection products --file products.json --jsonArray --uri $MONGO_URI_NEW
@rririanto
rririanto / Mongoexport.sh
Last active March 26, 2022 18:35
Remove _id from Mongoexport result
export MONGODB_URI="mongodb://<username>:<password>@<ip:port>/<database>?authMechanism=SCRAM-SHA-256&readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false"
mongoexport --collection=users --out=users_raw.json --jsonArray --uri=$MONGODB_URI && jq 'map(del(._id))' users_raw.json > users.json
mongoexport --collection=products --out=products_raw.json --jsonArray --uri=$MONGODB_URI && jq 'map(del(._id))' products_raw.json > products.json
@rririanto
rririanto / install-python.sh
Created March 13, 2022 19:41
Install python3 DO
sudo apt update
sudo apt install -y python3-pip
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
pip3 install pipenv
ssh-keygen
@rririanto
rririanto / test_user_models.py
Last active May 24, 2021 06:45
Pytest for user models
import pytest
import copy
from apps.user.models import User
from django.forms.models import model_to_dict
from typing import Any, Dict
pytestmark = pytest.mark.django_db
TEST_USERS = {
# pull official python alpine image
FROM python:3.7
# Set Environment Variable
ENV PYTHONUNBUFFERED 1
ENV C_FORCE_ROOT true
RUN mkdir -p /opt/django/dev
# Creating Work Directory
db:
image: postgres
container_name: db
restart: unless-stopped
tty: true
environment:
- POSTGRES_DB=blog
- POSTGRES_USER=blog
- POSTGRES_PASSWORD=blog
ports:
codesign -f -s - /Applications/Discord.app/Contents/Frameworks/Discord\ Helper\ \(Renderer\).app
@rririanto
rririanto / image_to_s3_ghostcms.py
Last active April 29, 2021 01:01
Image to s3 ghost python
import requests # pip install requests
import jwt # pip install pyjwt
from datetime import datetime as date
import json
import os
CONTENT_API = "<YOUR CONTENT API>"
ADMIN_API = "<YOUR ADMIN API>"
API_URL = "<URL ENDPOINT>"