Skip to content

Instantly share code, notes, and snippets.

View thevillagehacker's full-sized avatar
🎯
Focusing

Naveen Jagadeesan thevillagehacker

🎯
Focusing
View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
@thevillagehacker
thevillagehacker / extract.js
Created August 7, 2023 03:12
Extract Embeded URL and location in the web page
javascript:(function(){var scripts=document.getElementsByTagName("script"),regex=/(?<=(\"|\'|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\`))/g;const results=new Set;for(var i=0;i<scripts.length;i++){var t=scripts[i].src;""!=t&&fetch(t).then(function(t){return t.text()}).then(function(t){var e=t.matchAll(regex);for(let r of e)results.add(r[0])}).catch(function(t){console.log("An error occurred: ",t)})}var pageContent=document.documentElement.outerHTML,matches=pageContent.matchAll(regex);for(const match of matches)results.add(match[0]);function writeResults(){results.forEach(function(t){document.write(t+"<br>")})}setTimeout(writeResults,3e3);})();

COMMON COMMANDS

NMAP

nmap -p- -sT -sV -A $IP
nmap -p- -sC -sV $IP --open
nmap -p- --script=vuln $IP
nmap --script http-methods --script-args http-methods.url-path='/website' <target>

To integrate this progress bar feature directly into the system's core commands (cp, mv), you can create wrapper scripts around the existing commands and place them in a directory that is prioritized in the system's PATH. Here's how you can do it:

Step 1: Create Wrapper Scripts

Create scripts that wrap around the existing cp, mv commands and add the progress bar functionality.

1. Wrapper Script for cp:

#!/bin/bash
@thevillagehacker
thevillagehacker / markdown_custom_config_color_scheme.json
Last active December 17, 2024 09:09
sublime color scheme custom config for markdown
{
"variables":
{
},
"globals":
{
"foreground": "#ffffff",
"background": "#010409",
"caret": "#F8F8F0",
"invisibles": "#31333D",
@thevillagehacker
thevillagehacker / monokai-color-theme.json
Last active October 16, 2024 03:35
VS Code custom Monoki color scheme
{
"type": "dark",
"colors": {
"dropdown.background": "#161b22",
"list.activeSelectionBackground": "#6e768166",
"quickInputList.focusBackground": "#6e768166",
"dropdown.listBackground": "#1e1f1c",
"list.inactiveSelectionBackground": "#6e768166",
"list.hoverBackground": "#3f415f",
"list.dropBackground": "#7d889866",
@thevillagehacker
thevillagehacker / dracula.omp.json
Created April 18, 2026 06:25
Dracula Theme for oh-my-posh - refined as per my liking.
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#6272a4",
"foreground": "#f8f8f2",
"leading_diamond": "\ue0b6",
@thevillagehacker
thevillagehacker / STORM.md
Created June 18, 2026 04:34
The Stanford STORM Method: How to Make Claude Research Like a PhD in Minutes.

Most people use Claude like a search box. Ask, answer, close tab. They are leaving the best feature locked. Save this :) Stanford built a research system called STORM. In peer reviewed testing it produced articles 25 percent more organized than the next best method. It is open source. It is free. Almost nobody knows you can run the same idea inside Claude with 4 prompts. No software. No GitHub. No setup. Just paste. 5 minutes from now you will know more about your topic than people who spent days reading. Here is the full method.

img

Phase 1: What STORM Actually Is

STORM stands for Synthesis of Topic Outlines through Retrieval and Multi perspective Question Asking. It was published at NAACL 2024 by the Stanford OVAL Lab.