Skip to content

Instantly share code, notes, and snippets.

View freakynit's full-sized avatar

Nitin Bansal freakynit

View GitHub Profile
@freakynit
freakynit / Main.java
Created September 5, 2025 05:31
A Java implementation of 12 RISC-style primitive operations and a 2-2-1 neural network to learn XOR using backpropagation, inspired by LuminalAI, for educational purposes.
import java.util.Arrays;
import java.util.Random;
/**
* A small RISC-style primitive operation framework (inpsired by LuminalAI),
* implementing 12 primitive ops and a demo network.
*
* Inspiration: https://github.com/luminal-ai/luminal
*
[
{
"name": "Worldwide",
"placeType": {
"code": 19,
"name": "Supername"
},
"url": "http://where.yahooapis.com/v1/place/1",
"parentid": 0,
"country": "",
[
{
"place_name": "Worldwide",
"country": "",
"woeid": 1,
"type": "Supername",
"country_code": null
},
{
"place_name": "Winnipeg",
place_name country country_code woeid type
Worldwide 1 Supername
Winnipeg Canada CA 2972 Town
Ottawa Canada CA 3369 Town
Quebec Canada CA 3444 Town
Montreal Canada CA 3534 Town
Toronto Canada CA 4118 Town
Edmonton Canada CA 8676 Town
Calgary Canada CA 8775 Town
Vancouver Canada CA 9807 Town
@freakynit
freakynit / agent loop
Created August 8, 2025 05:36 — forked from frankjniu/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
function filterNoisyGithubCommentEmails(subject, list, days) {
days = (typeof days === "undefined" || days === null || isNaN(days)) ? 1 : days;
var query = [];
if (list) query.push('list:' + list);
if (subject) query.push('subject:"' + subject + '"');
if (days) query.push('newer_than:' + days + 'd');
var searchString = query.join(' ');
const patterns = [

1. Overall Architecture

  • Structure & Flow:
    Your code follows a common Cloudflare Workers pattern:

    • An event listener intercepts fetch events.
    • The handleRequest() function rewrites the incoming URL, creates a new request with modified headers, forwards it to the target server, and then post-processes the response (rewriting redirects, CORS, cookies, and even HTML content).
  • HTML Rewriting:
    You’re using Cloudflare’s HTMLRewriter to adjust links (a[href]), images (img[src]), and form actions (form[action]). This is a good approach for making proxied HTML interactive through your proxy.

Key Observations:

  1. The code implements a basic reverse proxy that:
    • Routes requests through a specific domain (stratosphericus.workers.dev)
    • Rewrites URLs in HTML responses
    • Handles CORS
    • Manages cookies
    • Supports redirects

Potential Issues & Improvements:

@freakynit
freakynit / github-social.md
Last active February 17, 2025 16:32
Using Github as a censorship resitant social media network.

1. Authentication & User Management

  • Authentication: Fallback to GitHub's own signup/login flow..
  • Identities and User Profiles: Users will be identified by their GitHub usernames, and their GitHub profiles act as their social profiles.

2. Data Model

Repositories as Groups

  • Each group is a GitHub repository.
  • The repo name represents the group name.